Skip to content

Commit

Permalink
Wifi 7833 (#507)
Browse files Browse the repository at this point in the history
* Added Perfecto details for data retreival

Signed-off-by: haricharan-jaka <[email protected]>

* Added device option and a function to fetch device details from lab_info.json

Signed-off-by: haricharan-jaka <[email protected]>

* Added all the Interop related details

Signed-off-by: haricharan-jaka <[email protected]>

* Changed all the things needed from pytest.ini to configuration

Signed-off-by: haricharan-jaka <[email protected]>

* Changed the security key for wpa2 5g ssid

Signed-off-by: haricharan-jaka <[email protected]>

* Removed Interop details from pytest.ini file

Signed-off-by: haricharan-jaka <[email protected]>

* Added --device option in Additional arguments of Interop workflow

Signed-off-by: haricharan-jaka <[email protected]>

* Added job number and name related to device specific

Signed-off-by: haricharan-jaka <[email protected]>

* changed the report to device specific for job number and name

Signed-off-by: haricharan-jaka <[email protected]>

* Removed the job number and name argument

Signed-off-by: haricharan-jaka <[email protected]>

* Removed space

Signed-off-by: haricharan-jaka <[email protected]>

* Removed Job name and number from Perfecto Details

Signed-off-by: haricharan-jaka <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Separate commands per line

Signed-off-by: Dmitry Dunaev <[email protected]>

* Chg: switch to self hosted and add sleep step

* Add: AWS dependency

* Fix: awscli and deleted sleep step

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Dbg: add sleep to get config

Signed-off-by: Dmitry Dunaev <[email protected]>

* Del: debug lines

Signed-off-by: Dmitry Dunaev <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Added slight upload rate on udp download to work in NAT mode

Signed-off-by: shivam <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* moving sanity to next

Signed-off-by: dutta-rohan <[email protected]>

* Added tls in the name of SSID for tls test cases (#424)

Signed-off-by: dutta-rohan <[email protected]>

* [WIFI-6851] Add: postgresql as DB for OWLS tests (#423)

Signed-off-by: Dmitry Dunaev <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* added regression and advance counts

Signed-off-by: dutta-rohan <[email protected]>

* added badges for advance and regression in readme file

Signed-off-by: dutta-rohan <[email protected]>

* added advance and regression text

Signed-off-by: dutta-rohan <[email protected]>

* added interop and lanforge side regression counts

Signed-off-by: dutta-rohan <[email protected]>

* Added Interop Regression and its count in readme

Signed-off-by: dutta-rohan <[email protected]>

* updated the name for interop Regression badge name

Signed-off-by: dutta-rohan <[email protected]>

* [WIFI-7229] Integrate virtual AP in Docker Compose testing workflow (#426)

* Integrate virtual AP in Docker Compose testing workflow and switch to CLI testing

Signed-off-by: Johann Hoffmann <[email protected]>

* Fix syntax error

Signed-off-by: Johann Hoffmann <[email protected]>

* Fix another syntax error

Signed-off-by: Johann Hoffmann <[email protected]>

* Execute command over SSH and fix CLI permissions

Signed-off-by: Johann Hoffmann <[email protected]>

* Add shared AWS variables and try to escape secret

Signed-off-by: Johann Hoffmann <[email protected]>

* Auto-accept new SSH host keys

Signed-off-by: Johann Hoffmann <[email protected]>

* Fix SSH key permissions

Signed-off-by: Johann Hoffmann <[email protected]>

* Use curl and switch to raw repository files

Signed-off-by: Johann Hoffmann <[email protected]>

* Add serial to CLI calls

Signed-off-by: Johann Hoffmann <[email protected]>

* Get mac address of virtual AP dynamically

Signed-off-by: Johann Hoffmann <[email protected]>

* Fix step condition syntax

Signed-off-by: Johann Hoffmann <[email protected]>

* Add silent option to curl

Signed-off-by: Johann Hoffmann <[email protected]>

* Re-apply AP config after starting firstcontact service

Signed-off-by: Johann Hoffmann <[email protected]>

* Remove duplicate quotes

Signed-off-by: Johann Hoffmann <[email protected]>

* Use local AP config file and add choice to test all microservices

Signed-off-by: Johann Hoffmann <[email protected]>

* Wait before re-applying config modifications to avoid overwrite

Signed-off-by: Johann Hoffmann <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Wifi 6731 (#421)

* Created a local variable for upstream_port to prevent appending of vlan_id to previous upstream_port

* corrected vlan_id

Signed-off-by: dutta-rohan <[email protected]>

* Wifi 6938 (#404)

* Country code with channel division: 2Ghz,20Mhz, US and channel 1

* change in testcase execution

* created country_code-US, with channel_width-20Mhz, channel_no-1 for 2G band

* missed git_configuration param

* checking from setup_params_general 'rf' to set radio config

* added country_code_channel_division funtion

* added radio config using radio_config

* corrected allure report

* changed function name

* check allure report

* Added comment

* allure report corrected

* Created testcase for channel 2 in 2G band

* checking allure report

* added channel mode VHT in AP configuration which is common for both wifi-5 and wifi-6 AP, without channel-mode always getting channel mode HE

* checking allure report

* corrected json_get url

* testcase for channel-2 in 20Mhz, US, 2G

* corrected channel overwritten on second testcase

* testcases for channels from 3 to 13 with US, 20Mhz, 2G

* US have 2G channels from 1 to 11

* added print statement to verify IP and channel no

* Checking again if client not assigned with IP

* Testcases: US, 40Mhz, 2G, channels 1-11

* Testcases: US, 40Mhz, 5G, channels (36,44,52,60,100,108,132,140)

* removed wrong testcases

* Testcases: IN, (20Mhz, 40Mhz), 2G, channels 1-11

* Testcases: IN, 40Mhz, 5G, channels (36,44,52,60,100,108,132,140)

* Testcases: CA, 20Mhz,40Mhz, 2G,5G, channels (1-11) (36,44,52,60,100,108,132,140)

* Testcases: CA, 40Mhz, 5G, channels (36,44,52,60,100,108,132,140)

* Testcases: CA, 5G, 80Mhz, channel (36, 52, 100, 132)

* Testcases: IN, 5G, 80Mhz, channel (36, 52, 100, 132)

* Testcases: US, 5G, 80Mhz, channel (36, 52, 100, 132)

* Testcases: CA, 20Mhz, 5G, channel (36,40,44,48,52,56,60, 64, 100, 104, 108, 112, 116,132, 136, 140, 144)

* Testcases: IN, 20Mhz, 5G, channel (36,40,44,48,52,56,60, 64, 100, 104, 108, 112, 116,132, 136, 140, 144)

* Testcases: US, 20Mhz, 5G, channel (36,40,44,48,52,56,60, 64, 100, 104, 108, 112, 116,132, 136, 140, 144)

* Added rf config improvements

Signed-off-by: shivam <[email protected]>

* Testcases: JP, 20Mhz, 40Mhz (2G+5G), 80Mhz (5G)

* Testcases: JP, 20Mhz, 40Mhz (2G+5G), 80Mhz (5G)

* Called json_post to change country of lanforge-radio

* Edited print message

* corrected cli command

* Testcases:GB(united kingdom) 20Mhz, 40Mhz, 80Mhz

* added cleanup to clear station before creating next station

* corrected radio-bands

* Added US country code to change lanforge-radio country

* Added IN country code to change lanforge-radio country

* corrected radio-bands

* Added US country code to change lanforge-radio country

Co-authored-by: shivam <[email protected]>
Co-authored-by: Shivam Thakur <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Wifi 7234 (#428)

* Added scan_ssid method

Signed-off-by: jitendracandela <[email protected]>

* modified code for testing scan_ssid method

Signed-off-by: jitendracandela <[email protected]>

* Added scan_ssid method and called that method in Client_Connectivity, Client_Connect, EAP_Connect

Signed-off-by: jitendracandela <[email protected]>

* added libs for creating tables

Signed-off-by: jitendracandela <[email protected]>

* added tabulate module

Signed-off-by: jitendracandela <[email protected]>

Co-authored-by: Shivam Thakur <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* fixed the error due to rf data being None

Signed-off-by: shivam <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Fix advanced testbed config generation

Signed-off-by: Johann Hoffmann <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* added the badge text to RF Testing from Advance

Signed-off-by: dutta-rohan <[email protected]>

* Fix composite action path

Signed-off-by: Johann Hoffmann <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Added Perfecto details for data retreival

Signed-off-by: haricharan-jaka <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Added device option and a function to fetch device details from lab_info.json

Signed-off-by: haricharan-jaka <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Added all the Interop related details

Signed-off-by: haricharan-jaka <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Changed all the things needed from pytest.ini to configuration

Signed-off-by: haricharan-jaka <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Changed the security key for wpa2 5g ssid

Signed-off-by: haricharan-jaka <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Removed Interop details from pytest.ini file

Signed-off-by: haricharan-jaka <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Added --device option in Additional arguments of Interop workflow

Signed-off-by: haricharan-jaka <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Added job number and name related to device specific

Signed-off-by: haricharan-jaka <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* changed the report to device specific for job number and name

Signed-off-by: haricharan-jaka <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Removed the job number and name argument

Signed-off-by: haricharan-jaka <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Removed space

Signed-off-by: haricharan-jaka <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Removed Job name and number from Perfecto Details

Signed-off-by: haricharan-jaka <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Separate commands per line

Signed-off-by: Dmitry Dunaev <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Chg: switch to self hosted and add sleep step

Signed-off-by: dutta-rohan <[email protected]>

* Add: AWS dependency

Signed-off-by: dutta-rohan <[email protected]>

* Fix: awscli and deleted sleep step

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Dbg: add sleep to get config

Signed-off-by: Dmitry Dunaev <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Del: debug lines

Signed-off-by: Dmitry Dunaev <[email protected]>
Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

* Modified .quali/get_config

Signed-off-by: dutta-rohan <[email protected]>

Co-authored-by: haricharan-jaka <[email protected]>
Co-authored-by: Dmitry Dunaev <[email protected]>
Co-authored-by: shivam <[email protected]>
Co-authored-by: Shivam Thakur <[email protected]>
Co-authored-by: ᴀᴍʀɪᴛ ʀᴀᴊ <[email protected]>
Co-authored-by: Dmitry Dunaev <[email protected]>
Co-authored-by: Johann Hoffmann <[email protected]>
Co-authored-by: karthika <[email protected]>
Co-authored-by: jitendracandela <[email protected]>
  • Loading branch information
10 people authored May 5, 2022
1 parent 81fdf5d commit da9ebb2
Show file tree
Hide file tree
Showing 8 changed files with 641 additions and 113 deletions.
488 changes: 464 additions & 24 deletions .github/workflows/interop.yml

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions .quali/get_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def main():
key = 'username' if key == 'uname' else key
key = 'password' if key == 'passkey' else key

ap_config[key] = get_attribute_value(session, attribute)
if get_attribute_value(session, attribute) != "":
ap_config[key] = get_attribute_value(session, attribute)
#ap_config[key] = get_attribute_value(session, attribute)

config['access_point'].append(ap_config)

Expand Down Expand Up @@ -96,4 +98,4 @@ def main():


if __name__ == '__main__':
main()
main()
1 change: 1 addition & 0 deletions tests/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

CONFIGURATION = data["CONFIGURATION"]

PERFECTO_DETAILS = data["PERFECTO_DETAILS"]

RADIUS_SERVER_DATA = data["RADIUS_SERVER_DATA"]

Expand Down
20 changes: 20 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
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
Expand Down Expand Up @@ -147,6 +148,12 @@ def pytest_addoption(parser):
default=False,
help="skip cloud controller and AP, run only lanforge tests on a ssid preconfigured"
)
parser.addoption(
"--device",
default="iPhone-11",
help="Device Model which is needed to test"
)


# Perfecto Parameters
parser.addini("perfectoURL", "Cloud URL")
Expand Down Expand Up @@ -196,6 +203,11 @@ def testbed(request):
var = request.config.getoption("--testbed")
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):
Expand Down Expand Up @@ -259,6 +271,14 @@ def get_configuration(testbed, request):
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():
Expand Down
109 changes: 55 additions & 54 deletions tests/e2e/interOp/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
sys.path.append(f'../tests')

from configuration import CONFIGURATION
from configuration import PERFECTO_DETAILS

from urllib3 import exceptions

Expand All @@ -52,68 +53,68 @@


@pytest.fixture(scope="function")
def get_PassPointConniOS_data(request):
def get_PassPointConniOS_data(request, get_device_configuration):
passPoint_data = {
"netAnalyzer-inter-Con-Xpath": "//*[@label='Network Connected']/parent::*/XCUIElementTypeButton",
"bundleId-iOS-Settings": request.config.getini("bundleId-iOS-Settings"),
"bundleId-iOS-Ping": request.config.getini("bundleId-iOS-Ping")
"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):
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": request.config.getini("bundleId-iOS-Settings"),
"bundleId-iOS-Safari": request.config.getini("bundleId-iOS-Safari"),
"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": request.config.getini("platformName-android"),
"appPackage-android": request.config.getini("appPackage-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):
def get_AccessPointConn_data(request, get_device_configuration):
passPoint_data = {
"bundleId-iOS-Settings": request.config.getini("bundleId-iOS-Settings"),
"bundleId-iOS-Ping": request.config.getini("bundleId-iOS-Ping")
"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):
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": request.config.getini("bundleId-iOS-Settings"),
"bundleId-iOS-Safari": request.config.getini("bundleId-iOS-Safari"),
"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": request.config.getini("platformName-android"),
"appPackage-android": request.config.getini("appPackage-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):
def get_ToggleWifiMode_data(request,get_device_configuration):
passPoint_data = {
# iOS
"bundleId-iOS-Settings": request.config.getini("bundleId-iOS-Settings"),
"bundleId-iOS-Settings": get_device_configuration["bundleId-iOS-Settings"],
# Android
"platformName-android": request.config.getini("platformName-android"),
"appPackage-android": request.config.getini("appPackage-android")
"platformName-android": get_device_configuration["platformName-android"],
"appPackage-android": get_device_configuration["appPackage-android"]
}
yield passPoint_data

Expand Down Expand Up @@ -394,7 +395,7 @@ def pytest_sessionfinish(session, exitstatus):


@pytest.fixture(scope="function")
def setup_perfectoMobile_android(request):
def setup_perfectoMobile_android(request, get_device_configuration):
from appium import webdriver
driver = None
reporting_client = None
Expand All @@ -403,11 +404,11 @@ def setup_perfectoMobile_android(request):
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

capabilities = {
'platformName': request.config.getini("platformName-android"),
'model': request.config.getini("model-android"),
'platformName': get_device_configuration["platformName-android"],
'model': get_device_configuration["model-android"],
'browserName': 'mobileOS',
# 'automationName' : 'Appium',
'securityToken': request.config.getini("securityToken"),
'securityToken': PERFECTO_DETAILS["securityToken"],
'useAppiumForWeb': 'false',
'useAppiumForHybrid': 'false',
# 'bundleId' : request.config.getini("appPackage-android"),
Expand All @@ -418,7 +419,7 @@ def setup_perfectoMobile_android(request):
pytest.exit("Exiting Pytest")

driver = webdriver.Remote(
'https://' + request.config.getini("perfectoURL") + '.perfectomobile.com/nexperience/perfectomobile/wd/hub',
'https://' + PERFECTO_DETAILS["perfectoURL"] + '.perfectomobile.com/nexperience/perfectomobile/wd/hub',
capabilities)
driver.implicitly_wait(2)

Expand All @@ -433,11 +434,11 @@ def setup_perfectoMobile_android(request):
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 = request.config.getini("projectName")
projectversion = request.config.getini("projectVersion")
jobname = request.config.getini("jobName")
jobnumber = request.config.getini("jobNumber")
tags = request.config.getini("reportTags")
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....")
Expand Down Expand Up @@ -506,7 +507,7 @@ def reportPerfecto(testCaseName, testCaseStatus, testErrorMsg, reportURL):


@pytest.fixture(scope="class")
def setup_perfectoMobileWeb(request):
def setup_perfectoMobileWeb(request, get_device_configuration):
from selenium import webdriver
rdriver = None
reporting_client = None
Expand All @@ -515,27 +516,27 @@ def setup_perfectoMobileWeb(request):
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

capabilities = {
'platformName': request.config.getini("platformName-iOS"),
'model': request.config.getini("model-iOS"),
'browserName': request.config.getini("browserType-iOS"),
'securityToken': request.config.getini("securityToken"),
'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://' + request.config.getini("perfectoURL") + '.perfectomobile.com/nexperience/perfectomobile/wd/hub',
'https://' + PERFECTO_DETAILS["perfectoURL"] + '.perfectomobile.com/nexperience/perfectomobile/wd/hub',
capabilities)
rdriver.implicitly_wait(2)

projectname = request.config.getini("projectName")
projectversion = request.config.getini("projectVersion")
jobname = request.config.getini("jobName")
jobnumber = request.config.getini("jobNumber")
tags = request.config.getini("reportTags")
testCaseName = request.config.getini("jobName")
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),
Expand Down Expand Up @@ -568,7 +569,7 @@ def teardown():


@pytest.fixture(scope="function")
def setup_perfectoMobile_iOS(request):
def setup_perfectoMobile_iOS(request, get_device_configuration):
from appium import webdriver
driver = None
reporting_client = None
Expand All @@ -577,11 +578,11 @@ def setup_perfectoMobile_iOS(request):
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

capabilities = {
'platformName': request.config.getini("platformName-iOS"),
'model': request.config.getini("model-iOS"),
'platformName': get_device_configuration["platformName-iOS"],
'model': get_device_configuration["model-iOS"],
'browserName': 'safari',
# 'automationName' : 'Appium',
'securityToken': request.config.getini("securityToken"),
'securityToken': PERFECTO_DETAILS["securityToken"],
'useAppiumForWeb': 'false',
'autoAcceptAlerts': 'true',
# 'bundleId' : request.config.getini("bundleId-iOS"),
Expand All @@ -594,7 +595,7 @@ def setup_perfectoMobile_iOS(request):
pytest.exit("Exiting Pytest")

driver = webdriver.Remote(
'https://' + request.config.getini("perfectoURL") + '.perfectomobile.com/nexperience/perfectomobile/wd/hub',
'https://' + PERFECTO_DETAILS["perfectoURL"] + '.perfectomobile.com/nexperience/perfectomobile/wd/hub',
capabilities)
driver.implicitly_wait(2)

Expand All @@ -609,11 +610,11 @@ def setup_perfectoMobile_iOS(request):
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 = request.config.getini("projectName")
projectversion = request.config.getini("projectVersion")
jobname = request.config.getini("jobName")
jobnumber = request.config.getini("jobNumber")
tags = request.config.getini("reportTags")
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....")
Expand Down Expand Up @@ -659,8 +660,8 @@ def teardown():
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 = request.config.getini("securityToken")
perfectoURL = request.config.getini("perfectoURL")
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"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", "vlan": 100}]},
"security_key": "something", "vlan": 100}]},
"rf": {},
"radius": False
}
Expand Down
Loading

0 comments on commit da9ebb2

Please sign in to comment.