mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-02 11:57:49 +00:00
* Added rate-limiting in both android_test and ios_test
* Removed ow_sanity_lf marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added ow_sanity_lf marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed ow_sanity_lf marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed ow_sanity_lf marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added ow_sanity_lf marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added missing methods
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Modified as per new framework
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added ow_sanity_lf marker for channel 11
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* 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 <anil.tegala@candelatech.com>
* 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 <jitendra.kushavah@candelatech.com>
* Modified code for two test cases as per new infra
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Addded radius_auth_data radius_acc_data
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added radius_auth_data and radius_acc_data for rate limiting with radius test cases
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added basic-07
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Converted num station in int
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed unnecessary interop testbed details from lab_info
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Enterprise cleint connect and client connectivity tests in Android
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Enterprise cleint connect and client connectivity tests in iOS
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added new sanity marker for Interop testcases
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Enterprise mode client connect test cases in Interop
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added random string addition in Interop testcases for setup profiles ssids
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added random string addition in Interop testcases for setup profiles ssids
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* changed WAN upstream port for interop testbeds
* Added the logic for retest the ucentral connectivity if it is disconnected
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Added NAT-WAN
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* gw - get commands api fix
* Removed sanity marker on vlan testcases
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* FIxed issue in DFS
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed allure report name for Enterprise mode
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Pytest exit in case of error when testbed data is not available
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Fixed the string concat from previous commit
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Added check_connectivity fixture on every client_connectivity and dfs test case
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Made some bug fixes on testcases
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed profile data in testcases to match setup params
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added new fix in manual pytest execution workflow as per master
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added new fix in sanity workflow as per master
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed ssid names in setup params of general test cases
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Enterprise mode library support for wifi connect
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed Interop sanity marker from test connectivity file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* commented newly added methods for test connectivity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* commented traffic_generator_connectivity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* changed as new infra
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed interop_uc_sanity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed marker description
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added needed step for S20,S10 for forget ssid
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Fixed the ap libs command for ucentral restart
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Added test controller connectivity
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Changed markers as per pytest.ini
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Refractored dvlan
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added eth table and max station table in allure for test_traffic_generator_connectivity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* changed scope of Interop testcase name fixture
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added the fix for rate limiting test with vlans. Added Access Point connectivity Tests
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Changed scope of get test lib fixture
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed markers
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added run-lf condition in check_connectivity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added test case in the library function of setup_perfecto mobile data
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed interop testcase name fixture
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added new fail msg for Interop tests for better debugging
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added fix for testcase name in setup perfecto data
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added check_connectivity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added ow_sanity_lf marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Refractored DVLAN
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added lab_info.json back due to unexpected deletion
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added skip-all work with all test cases and removed the broken test cases
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Renoved the unwanted print for getting marker
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Provided vlan id in list
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added proper feature and parent suite
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* [WIFI-11228] Add: manual workflow step with details on namespace (#727)
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* fixed incorrect security parameter in MVLAN test functions
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Added Comments on the Library Functions for Proper Understanding
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added 6G RADIO Config data
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Removed the sync_repos.bash as it is not needed now
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Added proper suite, subsuite, parent suite, feature, title
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed method name wifi_capacity to rate_limiting_test
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Refactored dvlan in wpa3_eap
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* old mvlan test files removed
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* marker name corrections in SDK API tests
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* descritpion and marker changes in mvlan tests
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Added suite,sub_suite,parent,feature for IN,RU,SG
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Modified as per new freamework and enhanced allure and changed file name to dynamic qos
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed country from CA to US
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added 6g in get_applied_ssid_info method
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed manager ip to localhost
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added FMS Tests
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* added basic-08 & advance-01 info for tunneling
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Added improvements around pass and fail for ap connectivity and added basic lab_info format
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Added proper feature, parent suite, suite, sub_suite and title
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added Toggle-Wifi Button Functionality for both android and ios tests file
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Added toggle_wifi_mode test-cases for bridge,nat,vlan modes
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Added fix for 2.4g based bssid band data
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* rempved rate_limiting_tests marker
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Refractored channel vs country code
* Corrected setup_basic_configuration
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added reports dir creation logic
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* vlan id's passed to test functions in mvlan
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* removed security_key from open test case
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Fixed scan ssid issue in vlan
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Fixed scan ssid issue and wrong security issue
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* changed vlan id for test_disable_vlan_wpa2_2g test case
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed dataplane_throughput_test marker to dataplane_tests
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed password for controller
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* updated controller credentials in lab-info & tunnel_bash
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Fixed TypeError: can only concatenate str (not dict) to str issue
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed parent_suite from OpenWifi Dynamic Vlan Test to Dynamic Vlan Test
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Fix: resolved Pixel 4 scroll down issue, by modifying scrollDown() in android_libs.py
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* reverted old password in controller info
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* IP validation issue in DVLAN
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Removed traffic_generator_connectivity test case and Modification for allure enhancement
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed parent suite and suite
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Renamed dynamic_qos_tests to rate_limiting_with_radius_tests
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed parent suite to Throughput Benchmark Test
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added missing key_mgmt for wp3
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* key_mgmt issue in DVLAN-wpa3e
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added security markers
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* [WIFI-11619] Upd: Docker instructions update (#739)
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* DVLAN admin_up issue
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added pk_passwd and num_stations
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added num_stations
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added num_stations, execution_number and In tls added pk_passwd argument
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added max stations
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added client_scale_tests
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added 6GHz test cases
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added new test channels
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added execution_number in parametrize
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* added new marker for general security mode testcases in Interop
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed one ssid with internet variable logic for Interop android
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added proper feature, parent_suite, suite, sub_suite, title in allure report for client_scale_test and dataplane_throughput_test
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed the teardown logic in android tests
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added global devicemodel in teardown function of Android
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added return statement for IP address
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added return statement for IP address
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed ip addr of rate limiting radius server to 10.28.3.100
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Changed ingress-rate to 10 and egress-rate to 5
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added pre-cleanup for deleting existing stations
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* [WIFI-11619] Fix: Docker example command
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* Changed RATE LIMITING RADIUS SERVER ip to 10.28.3.100
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added wpa personal and open bridge test cases for client scale test
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added Toggle Airplane Mode
* Added toggle airplane mode test-cases (NAT, VLAN)
Signed-off-by: karthikeyan <karthikeyan.thirumurthy@candelatech.com>
* Added toggle airplane mode functionality in perfecto library
Signed-off-by: karthikeyan <karthikeyan.thirumurthy@candelatech.com>
* Changed teardown func placement in android tests to accomodate perfecto report
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Refactored client-isolation test-cases
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* refactored multi-station performance test-cases
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Added logic to setup_configuration_data() to support for multi-band combinations
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* allure attachments for client-isolation test_cases
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* [WIFI-11619] Fix: workflow dependencies
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Dbg: runtime user
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Chg: set files permissions
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Dbg: add step for status
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* Adjusted parameters in rate limiting for perfecto interop
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* [WIFI-11619] Add: git commit the changes
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Add: git commit the changes
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Add: git commit the changes
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Add: git commit the changes
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Add: git commit the changes
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Chg: GitHub Pages dir
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* [WIFI-11619] Chg: GitHub Pages dir
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* Added extra parameters in rate limiting test to accomodate lanforge testcases in Perfecto Interop
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* [WIFI-11619] Add: README note
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
* Rectified ssid parameter in Perfecto Interop
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed ssid to ssid_name in Interop rate limiting testcases
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed execution number logic (NAT-LAN logic) for NAT mode ttls test cases
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Refactored multi-asso-disasso
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Revert "Added logic to setup_configuration_data() to support for multi-band combinations"
This reverts commit cef8a23315.
* Added try and except logic in push_config
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* 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 <jitendra.kushavah@candelatech.com>
* Removed resp is None logic
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added Interop sanity marker in connectivity tests
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Updated nat mode & create_vlan parameter for Multi Station Performance test-cases
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Added title, suite for multi-asso-disasso
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added table results for multi-station-performance test-cases
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Updated Readme file in wlan-testing
Signed-off-by: shivam <shivam.thakur@candelatech.com>
* Added check_connectivity arg
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Added title,suite for VLAN-multi-asso-disasso
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Refactored rx_sens from rx_sensitivity test to TR-398 Issue 2
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Resolved conflicts in Lab_info.json
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Open Passpoint required data in Configuration.py
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Open roaming configuration Fixture
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Open Roaming support code in Controller libs and tip_2x
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added sample testcase of open roaming for checking
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Comments in Open roaming testcase
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Modified upload_rate for wifi_capacity
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Removed unnecessary Passpoint data
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed unnecessary Passpoint data in configuration.py
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Adding new Jira links and Descriptions
Signed-off-by: Rajendra <rajendra.pappu@candelatech.com>
* added passpoint info to tunnel bash
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* created 5g tests for rxsens
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
* Modified multi station performance udp_download test-cases for test result table
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
* Deleted wifi_capacity_test
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added or removed performance marker for performance suite
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Enhanced allure report for sanity
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added sanity test plans and markers
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed unnecessary marker
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added Interop Testplan markers in testplan.md file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed emoji's from testplan file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added emoji's from testplan file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added some formatting in texts in testplan file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed some formatting in texts in testplan file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added some formatting in texts in testplan file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added jira links, description and markers for new sanity testcases
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Added markers and description for some more of sanity suite testcases
Signed-off-by: Jyothsna-setti <jyothsna.polamarasetty@candelatech.com>
* Added test plans md file in readme.md file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Added test plans md file in readme.md file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Changed marker expressions in Testplans.md file
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
* Removed wrong duplicate parent_suite
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Added test description
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed unwanted marker and Added test description
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Removed duplicate function name
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Modified parent suite
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* Modified parent suite and feature name
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
* modified mode of udaya AP from wifi6 to wifi5
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
* Logging response info for configuration push
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
Signed-off-by: shivam <shivam.thakur@candelatech.com>
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
Signed-off-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
Signed-off-by: karthikeyan <karthikeyan.thirumurthy@candelatech.com>
Signed-off-by: Rajendra <rajendra.pappu@candelatech.com>
Signed-off-by: Jyothsna-setti <jyothsna.polamarasetty@candelatech.com>
Co-authored-by: tarun-candela <tarunkumar.madabathula@candelatech.com>
Co-authored-by: anil-tegala <anil.tegala@candelatech.com>
Co-authored-by: haricharan-jaka <haricharan.jaka@candelatech.com>
Co-authored-by: shivam <shivam.thakur@candelatech.com>
Co-authored-by: karthikaeyetea <karthika.subramani@candelatech.com>
Co-authored-by: Dmitry Dunaev <83591011+dunaev-opsfleet@users.noreply.github.com>
Co-authored-by: Dmitry Dunaev <dmitry@opsfleet.com>
Co-authored-by: karthikeyan <karthikeyan.thirumurthy@candelatech.com>
Co-authored-by: Rajendra <rajendra.pappu@candelatech.com>
Co-authored-by: Jyothsna-setti <jyothsna.polamarasetty@candelatech.com>
1015 lines
36 KiB
Groff
1015 lines
36 KiB
Groff
"""
|
|
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()
|