mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-02 20:07:57 +00:00
Added Android Test Cases
Signed-off-by: raj-TIP <rpasupathy@perfectomobile.com>
This commit is contained in:
Submodule lanforge/lanforge-scripts updated: de86a454b2...7b596c3f2f
@@ -80,8 +80,13 @@ def setup_perfectoMobile_android(request):
|
|||||||
|
|
||||||
TestCaseFullName = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
|
TestCaseFullName = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
|
||||||
nCurrentTestMethodNameSplit = re.sub(r'\[.*?\]\ *', "", TestCaseFullName)
|
nCurrentTestMethodNameSplit = re.sub(r'\[.*?\]\ *', "", TestCaseFullName)
|
||||||
|
try:
|
||||||
TestCaseName = nCurrentTestMethodNameSplit.removeprefix('test_')
|
TestCaseName = nCurrentTestMethodNameSplit.removeprefix('test_')
|
||||||
#print ("\nTestCaseName: " + TestCaseName)
|
print ("\nTestCaseName: " + TestCaseName)
|
||||||
|
except Exception as e:
|
||||||
|
TestCaseName = nCurrentTestMethodNameSplit
|
||||||
|
print("\nUpgrade Python to 3.9 to avoid test_ string in your test case name, see below URL")
|
||||||
|
print("https://www.andreagrandi.it/2020/10/11/python39-introduces-removeprefix-removesuffix/")
|
||||||
|
|
||||||
projectname = request.config.getini("projectName")
|
projectname = request.config.getini("projectName")
|
||||||
projectversion = request.config.getini("projectVersion")
|
projectversion = request.config.getini("projectVersion")
|
||||||
@@ -97,12 +102,35 @@ def setup_perfectoMobile_android(request):
|
|||||||
|
|
||||||
def teardown():
|
def teardown():
|
||||||
try:
|
try:
|
||||||
print(" -- Tear Down --")
|
print("\n\n---------- Tear Down ----------")
|
||||||
|
|
||||||
|
|
||||||
|
testFailed = request.session.testsfailed
|
||||||
|
if testFailed>0:
|
||||||
|
print ("Test Case Failure, please check report link: " + testCaseName)
|
||||||
|
reporting_client.test_stop(TestResultFactory.create_failure("Exception See Test Case"))
|
||||||
|
#seen = {None}
|
||||||
|
#session = request.node
|
||||||
|
#print(session)
|
||||||
|
elif testFailed<=0:
|
||||||
reporting_client.test_stop(TestResultFactory.create_success())
|
reporting_client.test_stop(TestResultFactory.create_success())
|
||||||
print('Report-Url: ' + reporting_client.report_url() + '\n')
|
|
||||||
|
#amount = len(request.session.items)
|
||||||
|
#print("Test Session Items: ")
|
||||||
|
#print(amount)
|
||||||
|
|
||||||
|
#tests_count = request.session.testscollected
|
||||||
|
#print("Test Collected: ")
|
||||||
|
#print(tests_count)
|
||||||
|
|
||||||
|
print('Report-Url: ' + reporting_client.report_url())
|
||||||
|
print("----------------------------------------------------------")
|
||||||
driver.close()
|
driver.close()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(" -- Exception Not Able To close --")
|
print(" -- Exception While Tear Down --")
|
||||||
|
reporting_client.test_stop(TestResultFactory.create_failure("Exception"))
|
||||||
|
print('Report-Url-Failure: ' + reporting_client.report_url() + '\n')
|
||||||
|
driver.close()
|
||||||
print (e.message)
|
print (e.message)
|
||||||
finally:
|
finally:
|
||||||
try:
|
try:
|
||||||
@@ -152,14 +180,24 @@ def set_APconnMobileDevice_android(WifiName, WifiPass, setup_perfectoMobile, con
|
|||||||
print("Get Connected Wifi Name if any")
|
print("Get Connected Wifi Name if any")
|
||||||
report.step_start("Get Connected Wifi Name if any")
|
report.step_start("Get Connected Wifi Name if any")
|
||||||
try:
|
try:
|
||||||
driver.implicitly_wait(35)
|
driver.implicitly_wait(20)
|
||||||
WifiNameElement = driver.find_element_by_xpath("//*[@resource-id='android:id/summary']")
|
WifiNameElement = driver.find_element_by_xpath("//*[@resource-id='android:id/summary']")
|
||||||
Wifi_AP_Name = WifiNameElement.text
|
Wifi_AP_Name = WifiNameElement.text
|
||||||
print("Current Wifi Status Name: " + Wifi_AP_Name)
|
print("Current Wifi Status Name: " + Wifi_AP_Name)
|
||||||
except NoSuchElementException:
|
except NoSuchElementException:
|
||||||
report.step_start("Wifi Radio Button Enabled")
|
report.step_start("Checking Wifi Radio Button Status")
|
||||||
WifiRadioBtnConnections = driver.find_element_by_xpath("//*[@resource-id='android:id/switch_widget' and @content-desc='Wi-Fi']")
|
try:
|
||||||
|
driver.implicitly_wait(5)
|
||||||
|
WifiRadioBtnConnections = driver.find_element_by_xpath("//*[@resource-id='android:id/switch_widget' and @content-desc='Wi-Fi' and @text='Off']")
|
||||||
|
report.step_start("Wifi Radio Button Disabled, Enabling Radio Button..")
|
||||||
|
print("Wifi Radio Button Disabled, Enabling Radio Button..")
|
||||||
WifiRadioBtnConnections.click()
|
WifiRadioBtnConnections.click()
|
||||||
|
except NoSuchElementException:
|
||||||
|
Wifi_AP_Name="Null"
|
||||||
|
driver.implicitly_wait(25)
|
||||||
|
report.step_start("Wifi Radio Button Already Enabled")
|
||||||
|
print("Wifi Radio Button Already Enabled")
|
||||||
|
|
||||||
except NoSuchElementException:
|
except NoSuchElementException:
|
||||||
Wifi_AP_Name="Null"
|
Wifi_AP_Name="Null"
|
||||||
print("Device not connected to any Wifi")
|
print("Device not connected to any Wifi")
|
||||||
@@ -309,7 +347,7 @@ def ForgetWifiConnection(setup_perfectoMobile, WifiName, connData):
|
|||||||
print("Switching Context to Native")
|
print("Switching Context to Native")
|
||||||
driver.switch_to.context('NATIVE_APP')
|
driver.switch_to.context('NATIVE_APP')
|
||||||
contexts = driver.contexts
|
contexts = driver.contexts
|
||||||
print(contexts)
|
#print(contexts)
|
||||||
|
|
||||||
#Open Settings Application
|
#Open Settings Application
|
||||||
openApp(connData["appPackage-android"], setup_perfectoMobile)
|
openApp(connData["appPackage-android"], setup_perfectoMobile)
|
||||||
@@ -343,6 +381,7 @@ def ForgetWifiConnection(setup_perfectoMobile, WifiName, connData):
|
|||||||
wifiElement.click()
|
wifiElement.click()
|
||||||
|
|
||||||
if Wifi_AP_Name.__eq__(WifiName):
|
if Wifi_AP_Name.__eq__(WifiName):
|
||||||
|
report.step_start("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name)
|
||||||
print("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name)
|
print("Wifi Name Matches - Already Connected To: " + Wifi_AP_Name)
|
||||||
|
|
||||||
print("Load Wifi Details Page")
|
print("Load Wifi Details Page")
|
||||||
@@ -366,13 +405,13 @@ def ForgetWifiConnection(setup_perfectoMobile, WifiName, connData):
|
|||||||
report.step_start("Verify if wifi is disconnected from: " + WifiName)
|
report.step_start("Verify if wifi is disconnected from: " + WifiName)
|
||||||
WifiForget= driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']")
|
WifiForget= driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']")
|
||||||
print("Wifi Not disconnected, check xpath for: " + WifiName)
|
print("Wifi Not disconnected, check xpath for: " + WifiName)
|
||||||
assert False
|
|
||||||
except NoSuchElementException:
|
except NoSuchElementException:
|
||||||
print("Wifi Disconnected Successfully: " + WifiName)
|
print("Wifi Disconnected Successfully: " + WifiName)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("Wifi Does not Match with Wifi: " + WifiName)
|
print("Wifi Does not Match with Wifi: " + WifiName)
|
||||||
|
report.step_start("Wifi Does not Match with Wifi: " + WifiName)
|
||||||
|
report.step_start("Probably wifi auto connected to another network")
|
||||||
try:
|
try:
|
||||||
report.step_start("Wifi Details Page")
|
report.step_start("Wifi Details Page")
|
||||||
WifiInternetDetails = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/wifi_details']")
|
WifiInternetDetails = driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/wifi_details']")
|
||||||
@@ -387,13 +426,12 @@ def ForgetWifiConnection(setup_perfectoMobile, WifiName, connData):
|
|||||||
except NoSuchElementException:
|
except NoSuchElementException:
|
||||||
print("Wifi Connection Error: " + WifiName)
|
print("Wifi Connection Error: " + WifiName)
|
||||||
|
|
||||||
|
|
||||||
print("Verify if wifi is disconnected from: " + WifiName)
|
print("Verify if wifi is disconnected from: " + WifiName)
|
||||||
try:
|
try:
|
||||||
report.step_start("Verify if wifi is disconnected from: " + WifiName)
|
report.step_start("Verify if wifi is disconnected from: " + WifiName)
|
||||||
WifiForget= driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']")
|
WifiForget= driver.find_element_by_xpath("//*[@resource-id='com.android.settings:id/summary' and @text='Connected']/parent::*/android.widget.TextView[@text='" + WifiName + "']")
|
||||||
print("Wifi Not disconnected, check xpath for: " + WifiName)
|
print("Wifi Not disconnected, check xpath for: " + WifiName)
|
||||||
assert False
|
|
||||||
except NoSuchElementException:
|
except NoSuchElementException:
|
||||||
print("Wifi Disconnected Successfully: " + WifiName)
|
print("Wifi Disconnected Successfully: " + WifiName)
|
||||||
|
|
||||||
@@ -457,7 +495,7 @@ def Toggle_AirplaneMode_android(setup_perfectoMobile, connData):
|
|||||||
print("Switching Context to Native")
|
print("Switching Context to Native")
|
||||||
driver.switch_to.context('NATIVE_APP')
|
driver.switch_to.context('NATIVE_APP')
|
||||||
contexts = driver.contexts
|
contexts = driver.contexts
|
||||||
print(contexts)
|
#print(contexts)
|
||||||
|
|
||||||
#Open Settings Application
|
#Open Settings Application
|
||||||
openApp(connData["appPackage-android"], setup_perfectoMobile)
|
openApp(connData["appPackage-android"], setup_perfectoMobile)
|
||||||
@@ -513,7 +551,7 @@ def Toggle_WifiMode_android(setup_perfectoMobile, WifiName, connData):
|
|||||||
print("Switching Context to Native")
|
print("Switching Context to Native")
|
||||||
driver.switch_to.context('NATIVE_APP')
|
driver.switch_to.context('NATIVE_APP')
|
||||||
contexts = driver.contexts
|
contexts = driver.contexts
|
||||||
print(contexts)
|
#print(contexts)
|
||||||
|
|
||||||
#Open Settings Application
|
#Open Settings Application
|
||||||
openApp(connData["appPackage-android"], setup_perfectoMobile)
|
openApp(connData["appPackage-android"], setup_perfectoMobile)
|
||||||
@@ -587,7 +625,6 @@ def Toggle_WifiMode_android(setup_perfectoMobile, WifiName, connData):
|
|||||||
|
|
||||||
return WifiFlag
|
return WifiFlag
|
||||||
|
|
||||||
|
|
||||||
def verifyUploadDownloadSpeed_android(setup_perfectoMobile, get_APToMobileDevice_data):
|
def verifyUploadDownloadSpeed_android(setup_perfectoMobile, get_APToMobileDevice_data):
|
||||||
print("\n-------------------------------------")
|
print("\n-------------------------------------")
|
||||||
print("Verify Upload & Download Speed")
|
print("Verify Upload & Download Speed")
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import sys
|
|||||||
import time
|
import time
|
||||||
from selenium.common.exceptions import NoSuchElementException
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
from selenium.webdriver.common.by import By
|
from selenium.webdriver.common.by import By
|
||||||
#from appium import webdriver
|
|
||||||
from selenium.common.exceptions import NoSuchElementException
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
from selenium.webdriver.support.ui import WebDriverWait
|
from selenium.webdriver.support.ui import WebDriverWait
|
||||||
from appium.webdriver.common.mobileby import MobileBy
|
from appium.webdriver.common.mobileby import MobileBy
|
||||||
@@ -42,6 +41,11 @@ def rebootPhone(setup_perfectoMobile):
|
|||||||
setup_perfectoMobile[0].execute_script('mobile:handset:reboot', params)
|
setup_perfectoMobile[0].execute_script('mobile:handset:reboot', params)
|
||||||
|
|
||||||
def set_APconnMobileDevice_iOS(WifiName, WifiPass, setup_perfectoMobile, connData):
|
def set_APconnMobileDevice_iOS(WifiName, WifiPass, setup_perfectoMobile, connData):
|
||||||
|
print("\n-------------------------------------")
|
||||||
|
print("Select Wifi/AccessPoint Connection")
|
||||||
|
print("-------------------------------------")
|
||||||
|
|
||||||
|
reportFlag = True
|
||||||
|
|
||||||
print("Verifying Wifi/AP Connection Details....")
|
print("Verifying Wifi/AP Connection Details....")
|
||||||
report = setup_perfectoMobile[1]
|
report = setup_perfectoMobile[1]
|
||||||
@@ -79,9 +83,13 @@ def set_APconnMobileDevice_iOS(WifiName, WifiPass, setup_perfectoMobile, connDat
|
|||||||
|
|
||||||
#Verifies if AP is connected to Wifi status
|
#Verifies if AP is connected to Wifi status
|
||||||
#print("Verify Wifi Connection Status..")
|
#print("Verify Wifi Connection Status..")
|
||||||
|
try:
|
||||||
report.step_start("Verify Wifi Connected Status")
|
report.step_start("Verify Wifi Connected Status")
|
||||||
WifiXpath = "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeStaticText[@label='"+ Wifi_AP_Name + "']"
|
WifiXpath = "//*[@label='selected']/parent::*/parent::*/XCUIElementTypeStaticText[@label='"+ Wifi_AP_Name + "']"
|
||||||
elementWifName = driver.find_element_by_xpath(WifiXpath)
|
elementWifName = driver.find_element_by_xpath(WifiXpath)
|
||||||
|
except NoSuchElementException:
|
||||||
|
reportFlag = False
|
||||||
|
assert reportFlag
|
||||||
|
|
||||||
#Check AP Internet Error Msg
|
#Check AP Internet Error Msg
|
||||||
print("Checking Internet Connection Error..")
|
print("Checking Internet Connection Error..")
|
||||||
@@ -106,6 +114,8 @@ def set_APconnMobileDevice_iOS(WifiName, WifiPass, setup_perfectoMobile, connDat
|
|||||||
wifiXpath2.click()
|
wifiXpath2.click()
|
||||||
|
|
||||||
except NoSuchElementException:
|
except NoSuchElementException:
|
||||||
|
reportFlag = False
|
||||||
|
assert reportFlag
|
||||||
print("\n Can't find Wifi/AP NAME.....CheckXpath & Wifi Name")
|
print("\n Can't find Wifi/AP NAME.....CheckXpath & Wifi Name")
|
||||||
|
|
||||||
#Set password if Needed
|
#Set password if Needed
|
||||||
@@ -123,10 +133,17 @@ def set_APconnMobileDevice_iOS(WifiName, WifiPass, setup_perfectoMobile, connDat
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
WifiInternetErrMsg2 = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text
|
WifiInternetErrMsg2 = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text
|
||||||
|
reportFlag = False
|
||||||
except NoSuchElementException:
|
except NoSuchElementException:
|
||||||
|
reportFlag = True
|
||||||
print("No Wifi-AP Error Internet Error: " + WifiName)
|
print("No Wifi-AP Error Internet Error: " + WifiName)
|
||||||
|
return reportFlag
|
||||||
|
|
||||||
def Toggle_AirplaneMode_iOS(setup_perfectoMobile, connData):
|
def Toggle_AirplaneMode_iOS(setup_perfectoMobile, connData):
|
||||||
|
print("\n-----------------------")
|
||||||
|
print("Toggle Airplane Mode")
|
||||||
|
print("-----------------------")
|
||||||
|
|
||||||
report = setup_perfectoMobile[1]
|
report = setup_perfectoMobile[1]
|
||||||
driver = setup_perfectoMobile[0]
|
driver = setup_perfectoMobile[0]
|
||||||
currentResult = True
|
currentResult = True
|
||||||
@@ -210,6 +227,10 @@ def verify_APconnMobileDevice_iOS(WifiName, setup_perfectoMobile, connData):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def ForgetWifiConnection(setup_perfectoMobile, wifiName, connData):
|
def ForgetWifiConnection(setup_perfectoMobile, wifiName, connData):
|
||||||
|
print("\n-----------------------------")
|
||||||
|
print("Forget Wifi/AP Connection")
|
||||||
|
print("-----------------------------")
|
||||||
|
|
||||||
report = setup_perfectoMobile[1]
|
report = setup_perfectoMobile[1]
|
||||||
driver = setup_perfectoMobile[0]
|
driver = setup_perfectoMobile[0]
|
||||||
|
|
||||||
@@ -217,7 +238,7 @@ def ForgetWifiConnection(setup_perfectoMobile, wifiName, connData):
|
|||||||
print("Switching Context to Native")
|
print("Switching Context to Native")
|
||||||
driver.switch_to.context('NATIVE_APP')
|
driver.switch_to.context('NATIVE_APP')
|
||||||
contexts = driver.contexts
|
contexts = driver.contexts
|
||||||
print(contexts)
|
#print(contexts)
|
||||||
|
|
||||||
report.step_start("Forget Existing Wifi")
|
report.step_start("Forget Existing Wifi")
|
||||||
openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||||
@@ -274,6 +295,10 @@ def ForgetWifiConnection(setup_perfectoMobile, wifiName, connData):
|
|||||||
elementforgetWifi.click()
|
elementforgetWifi.click()
|
||||||
|
|
||||||
def Toggle_WifiMode_iOS(setup_perfectoMobile, connData):
|
def Toggle_WifiMode_iOS(setup_perfectoMobile, connData):
|
||||||
|
print("\n-----------------------")
|
||||||
|
print("Toggle Wifi Mode")
|
||||||
|
print("-----------------------")
|
||||||
|
|
||||||
report = setup_perfectoMobile[1]
|
report = setup_perfectoMobile[1]
|
||||||
driver = setup_perfectoMobile[0]
|
driver = setup_perfectoMobile[0]
|
||||||
|
|
||||||
@@ -435,7 +460,9 @@ def tearDown(setup_perfectoMobile):
|
|||||||
print (e.message)
|
print (e.message)
|
||||||
|
|
||||||
def verifyUploadDownloadSpeediOS(setup_perfectoMobile, get_APToMobileDevice_data):
|
def verifyUploadDownloadSpeediOS(setup_perfectoMobile, get_APToMobileDevice_data):
|
||||||
print("Verify Upload Download Speed")
|
print("\n-------------------------------------")
|
||||||
|
print("Verify Upload & Download Speed")
|
||||||
|
print("-------------------------------------")
|
||||||
|
|
||||||
report = setup_perfectoMobile[1]
|
report = setup_perfectoMobile[1]
|
||||||
driver = setup_perfectoMobile[0]
|
driver = setup_perfectoMobile[0]
|
||||||
@@ -443,12 +470,12 @@ def verifyUploadDownloadSpeediOS(setup_perfectoMobile, get_APToMobileDevice_data
|
|||||||
currentResult = True
|
currentResult = True
|
||||||
|
|
||||||
contexts = driver.contexts
|
contexts = driver.contexts
|
||||||
print("Printing Context")
|
#print("Printing Context")
|
||||||
print(contexts)
|
#print(contexts)
|
||||||
|
|
||||||
driver.switch_to.context('WEBVIEW_1')
|
driver.switch_to.context('WEBVIEW_1')
|
||||||
|
|
||||||
try:
|
|
||||||
print("Launching Safari")
|
print("Launching Safari")
|
||||||
report.step_start("Google Home Page")
|
report.step_start("Google Home Page")
|
||||||
driver.get(connData["webURL"])
|
driver.get(connData["webURL"])
|
||||||
@@ -485,9 +512,6 @@ def verifyUploadDownloadSpeediOS(setup_perfectoMobile, get_APToMobileDevice_data
|
|||||||
except NoSuchElementException:
|
except NoSuchElementException:
|
||||||
print("Access Point Verification NOT Completed, checking Connection....")
|
print("Access Point Verification NOT Completed, checking Connection....")
|
||||||
currentResult = False
|
currentResult = False
|
||||||
except Exception as e:
|
|
||||||
print (e.message)
|
|
||||||
|
|
||||||
|
|
||||||
return currentResult
|
return currentResult
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ if [ -d ../wlan-lanforge-scripts ]
|
|||||||
then
|
then
|
||||||
rm -fr lanforge/lanforge-scripts
|
rm -fr lanforge/lanforge-scripts
|
||||||
|
|
||||||
cp -ar ../wlan-lanforge-scripts lanforge/lanforge-scripts
|
cp -a ../wlan-lanforge-scripts lanforge/lanforge-scripts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -49,9 +49,35 @@ def pytest_addoption(parser):
|
|||||||
parser.addini("tr_pass", "Testrail Password")
|
parser.addini("tr_pass", "Testrail Password")
|
||||||
parser.addini("tr_project_id", "Testrail Project ID")
|
parser.addini("tr_project_id", "Testrail Project ID")
|
||||||
parser.addini("milestone", "milestone Id")
|
parser.addini("milestone", "milestone Id")
|
||||||
|
|
||||||
parser.addini("num_stations", "Number of Stations/Clients for testing")
|
parser.addini("num_stations", "Number of Stations/Clients for testing")
|
||||||
|
|
||||||
|
#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("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"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# change behaviour
|
# change behaviour
|
||||||
parser.addoption(
|
parser.addoption(
|
||||||
"--skip-upgrade",
|
"--skip-upgrade",
|
||||||
|
|||||||
@@ -11,31 +11,43 @@ from appium import webdriver
|
|||||||
from selenium.common.exceptions import NoSuchElementException
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import allure
|
||||||
|
|
||||||
if 'perfecto_libs' not in sys.path:
|
if 'perfecto_libs' not in sys.path:
|
||||||
sys.path.append(f'../libs/perfecto_libs')
|
sys.path.append(f'../libs/perfecto_libs')
|
||||||
|
|
||||||
from android_lib import closeApp, verifyUploadDownloadSpeed_android, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, setup_perfectoMobile_android
|
from android_lib import closeApp, verifyUploadDownloadSpeed_android, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, setup_perfectoMobile_android
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "NAT",
|
||||||
|
"ssid_modes": {
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
|
||||||
|
"rf": {},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
@pytest.mark.AccessPointConnectionAndroid
|
@pytest.mark.AccessPointConnectionAndroid
|
||||||
@pytest.mark.wifi5
|
@pytest.mark.interop_and
|
||||||
@pytest.mark.wifi6
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setup_profiles, create_profiles',
|
'setup_profiles',
|
||||||
[(["NAT"], ["NAT"])],
|
[setup_params_general],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
scope="class"
|
scope="class"
|
||||||
)
|
)
|
||||||
|
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
@pytest.mark.usefixtures("create_profiles")
|
|
||||||
class TestAcessPointConnection(object):
|
class TestAcessPointConnection(object):
|
||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_AccessPointConnection_5g_WPA2_Personal(self, setup_profile_data, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
def test_AccessPointConnection_5g_WPA2_Personal(self, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -59,9 +71,9 @@ class TestAcessPointConnection(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_AccessPointConnection_2g_WPA2_Personal(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
def test_AccessPointConnection_2g_WPA2_Personal(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -85,9 +97,9 @@ class TestAcessPointConnection(object):
|
|||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_AccessPointConnection_5g_WPA(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
def test_AccessPointConnection_5g_WPA(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -111,9 +123,9 @@ class TestAcessPointConnection(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_AccessPointConnection_2g_WPA(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
def test_AccessPointConnection_2g_WPA(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
|||||||
@@ -11,31 +11,43 @@ from appium import webdriver
|
|||||||
from selenium.common.exceptions import NoSuchElementException
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import allure
|
||||||
|
|
||||||
if 'perfecto_libs' not in sys.path:
|
if 'perfecto_libs' not in sys.path:
|
||||||
sys.path.append(f'../libs/perfecto_libs')
|
sys.path.append(f'../libs/perfecto_libs')
|
||||||
|
|
||||||
from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, setup_perfectoMobile_android
|
from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, setup_perfectoMobile_android
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "NAT",
|
||||||
|
"ssid_modes": {
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
|
||||||
|
"rf": {},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
@pytest.mark.ToggleAirplaneModeAndroid
|
@pytest.mark.ToggleAirplaneModeAndroid
|
||||||
@pytest.mark.wifi5
|
@pytest.mark.interop_and
|
||||||
@pytest.mark.wifi6
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setup_profiles, create_profiles',
|
'setup_profiles',
|
||||||
[(["NAT"], ["NAT"])],
|
[setup_params_general],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
scope="class"
|
scope="class"
|
||||||
)
|
)
|
||||||
|
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
@pytest.mark.usefixtures("create_profiles")
|
|
||||||
class TestToggleAirplaneModeAndroid(object):
|
class TestToggleAirplaneModeAndroid(object):
|
||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_ToogleAirplaneMode_5g_WPA2_Personal(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
def test_ToogleAirplaneMode_5g_WPA2_Personal(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -56,9 +68,9 @@ class TestToggleAirplaneModeAndroid(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_ToogleAirplaneMode_2g_WPA2_Personal(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
def test_ToogleAirplaneMode_2g_WPA2_Personal(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -79,9 +91,9 @@ class TestToggleAirplaneModeAndroid(object):
|
|||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_ToogleAirplaneMode_5g_WPA(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
def test_ToogleAirplaneMode_5g_WPA(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -102,9 +114,9 @@ class TestToggleAirplaneModeAndroid(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_ToogleAirplaneMode_2g_WPA(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
def test_ToogleAirplaneMode_2g_WPA(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
|||||||
@@ -0,0 +1,138 @@
|
|||||||
|
from logging import exception
|
||||||
|
import unittest
|
||||||
|
import warnings
|
||||||
|
from perfecto.test import TestResultFactory
|
||||||
|
import pytest
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
from selenium.webdriver.common.by import By
|
||||||
|
from appium import webdriver
|
||||||
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import allure
|
||||||
|
|
||||||
|
if 'perfecto_libs' not in sys.path:
|
||||||
|
sys.path.append(f'../libs/perfecto_libs')
|
||||||
|
|
||||||
|
from android_lib import closeApp, set_APconnMobileDevice_android, verifyUploadDownloadSpeed_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, setup_perfectoMobile_android
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "NAT",
|
||||||
|
"ssid_modes": {
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
|
||||||
|
"rf": {},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
|
@pytest.mark.OpenRoamingAndroid
|
||||||
|
#@pytest.mark.interop_and
|
||||||
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
'setup_profiles',
|
||||||
|
[setup_params_general],
|
||||||
|
indirect=True,
|
||||||
|
scope="class"
|
||||||
|
)
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
|
class TestOpenRoaming(object):
|
||||||
|
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
def test_OpenRoaming_5g_WPA2_Personal(self, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
|
ssidName = profile_data["ssid_name"]
|
||||||
|
ssidPassword = profile_data["security_key"]
|
||||||
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
print ("SSID_PASS: " + ssidPassword)
|
||||||
|
|
||||||
|
report = setup_perfectoMobile_android[1]
|
||||||
|
driver = setup_perfectoMobile_android[0]
|
||||||
|
connData = get_APToMobileDevice_data
|
||||||
|
|
||||||
|
#Set Wifi/AP Mode
|
||||||
|
set_APconnMobileDevice_android(ssidName, ssidPassword, setup_perfectoMobile_android, connData)
|
||||||
|
|
||||||
|
#Install Profile
|
||||||
|
|
||||||
|
#Verify Upload download Speed from device Selection
|
||||||
|
assert verifyUploadDownloadSpeed_android(setup_perfectoMobile_android, connData)
|
||||||
|
|
||||||
|
#ForgetWifi
|
||||||
|
ForgetWifiConnection(setup_perfectoMobile_android, ssidName, connData)
|
||||||
|
|
||||||
|
@pytest.mark.twog
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
def test_OpenRoaming_2g_WPA2_Personal(self, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
|
ssidName = profile_data["ssid_name"]
|
||||||
|
ssidPassword = profile_data["security_key"]
|
||||||
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
print ("SSID_PASS: " + ssidPassword)
|
||||||
|
|
||||||
|
report = setup_perfectoMobile_android[1]
|
||||||
|
driver = setup_perfectoMobile_android[0]
|
||||||
|
connData = get_APToMobileDevice_data
|
||||||
|
|
||||||
|
#Set Wifi/AP Mode
|
||||||
|
set_APconnMobileDevice_android(ssidName, ssidPassword, setup_perfectoMobile_android, connData)
|
||||||
|
|
||||||
|
#Toggle AirplaneMode
|
||||||
|
assert Toggle_AirplaneMode_android(setup_perfectoMobile_android, connData)
|
||||||
|
|
||||||
|
#ForgetWifi
|
||||||
|
ForgetWifiConnection(setup_perfectoMobile_android, ssidName, connData)
|
||||||
|
|
||||||
|
@pytest.mark.twog
|
||||||
|
@pytest.mark.wpa
|
||||||
|
def test_OpenRoaming_2g_WPA(self, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||||
|
ssidName = profile_data["ssid_name"]
|
||||||
|
ssidPassword = profile_data["security_key"]
|
||||||
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
print ("SSID_PASS: " + ssidPassword)
|
||||||
|
|
||||||
|
report = setup_perfectoMobile_android[1]
|
||||||
|
driver = setup_perfectoMobile_android[0]
|
||||||
|
connData = get_APToMobileDevice_data
|
||||||
|
|
||||||
|
#Set Wifi/AP Mode
|
||||||
|
set_APconnMobileDevice_android(ssidName, ssidPassword, setup_perfectoMobile_android, connData)
|
||||||
|
|
||||||
|
#Toggle AirplaneMode
|
||||||
|
assert Toggle_AirplaneMode_android(setup_perfectoMobile_android, connData)
|
||||||
|
|
||||||
|
#ForgetWifi
|
||||||
|
ForgetWifiConnection(setup_perfectoMobile_android, ssidName, connData)
|
||||||
|
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.wpa
|
||||||
|
def test_OpenRoaming_5g_WPA(self, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||||
|
ssidName = profile_data["ssid_name"]
|
||||||
|
ssidPassword = profile_data["security_key"]
|
||||||
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
print ("SSID_PASS: " + ssidPassword)
|
||||||
|
|
||||||
|
report = setup_perfectoMobile_android[1]
|
||||||
|
driver = setup_perfectoMobile_android[0]
|
||||||
|
connData = get_APToMobileDevice_data
|
||||||
|
|
||||||
|
#Set Wifi/AP Mode
|
||||||
|
set_APconnMobileDevice_android(ssidName, ssidPassword, setup_perfectoMobile_android, connData)
|
||||||
|
|
||||||
|
#Toggle AirplaneMode
|
||||||
|
assert Toggle_AirplaneMode_android(setup_perfectoMobile_android, connData)
|
||||||
|
|
||||||
|
#ForgetWifi
|
||||||
|
ForgetWifiConnection(setup_perfectoMobile_android, ssidName, connData)
|
||||||
@@ -11,31 +11,44 @@ from appium import webdriver
|
|||||||
from selenium.common.exceptions import NoSuchElementException
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import allure
|
||||||
|
|
||||||
if 'perfecto_libs' not in sys.path:
|
if 'perfecto_libs' not in sys.path:
|
||||||
sys.path.append(f'../libs/perfecto_libs')
|
sys.path.append(f'../libs/perfecto_libs')
|
||||||
|
|
||||||
from android_lib import closeApp, set_APconnMobileDevice_android, verifyUploadDownloadSpeed_android, Toggle_WifiMode_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, setup_perfectoMobile_android
|
from android_lib import closeApp, set_APconnMobileDevice_android, verifyUploadDownloadSpeed_android, Toggle_WifiMode_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, setup_perfectoMobile_android
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "NAT",
|
||||||
|
"ssid_modes": {
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
|
||||||
|
"rf": {},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.PassPointConnectionAndroid
|
@pytest.mark.PassPointConnectionAndroid
|
||||||
@pytest.mark.wifi5
|
@pytest.mark.interop_and
|
||||||
@pytest.mark.wifi6
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setup_profiles, create_profiles',
|
'setup_profiles',
|
||||||
[(["NAT"], ["NAT"])],
|
[setup_params_general],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
scope="class"
|
scope="class"
|
||||||
)
|
)
|
||||||
|
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
@pytest.mark.usefixtures("create_profiles")
|
|
||||||
class TestPassPointConnection(object):
|
class TestPassPointConnection(object):
|
||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_PassPointConnection_5g_WPA2_Personal(self, setup_profile_data, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
def test_PassPointConnection_5g_WPA2_Personal(self, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -52,16 +65,16 @@ class TestPassPointConnection(object):
|
|||||||
assert verifyUploadDownloadSpeed_android(setup_perfectoMobile_android, connData)
|
assert verifyUploadDownloadSpeed_android(setup_perfectoMobile_android, connData)
|
||||||
|
|
||||||
#Toggle Wifi Mode
|
#Toggle Wifi Mode
|
||||||
assert Toggle_WifiMode_android(setup_perfectoMobile_android, ssidName, connData)
|
Toggle_WifiMode_android(setup_perfectoMobile_android, ssidName, connData)
|
||||||
|
|
||||||
#ForgetWifi
|
#ForgetWifi
|
||||||
ForgetWifiConnection(setup_perfectoMobile_android, ssidName, connData)
|
ForgetWifiConnection(setup_perfectoMobile_android, ssidName, connData)
|
||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_PassPointConnection_2g_WPA2_Personal(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
def test_PassPointConnection_2g_WPA2_Personal(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -85,9 +98,9 @@ class TestPassPointConnection(object):
|
|||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_PassPointConnection_5g_WPA(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
def test_PassPointConnection_5g_WPA(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -111,9 +124,9 @@ class TestPassPointConnection(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_PassPointConnection_2g_WPA(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
def test_PassPointConnection_2g_WPA(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
|||||||
@@ -11,31 +11,43 @@ from appium import webdriver
|
|||||||
from selenium.common.exceptions import NoSuchElementException
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import allure
|
||||||
|
|
||||||
if 'perfecto_libs' not in sys.path:
|
if 'perfecto_libs' not in sys.path:
|
||||||
sys.path.append(f'../libs/perfecto_libs')
|
sys.path.append(f'../libs/perfecto_libs')
|
||||||
|
|
||||||
from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, setup_perfectoMobile_android
|
from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, setup_perfectoMobile_android
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "NAT",
|
||||||
|
"ssid_modes": {
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
|
||||||
|
"rf": {},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
@pytest.mark.ToggleWifiModeAndroid
|
@pytest.mark.ToggleWifiModeAndroid
|
||||||
@pytest.mark.wifi5
|
@pytest.mark.interop_and
|
||||||
@pytest.mark.wifi6
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setup_profiles, create_profiles',
|
'setup_profiles',
|
||||||
[(["NAT"], ["NAT"])],
|
[setup_params_general],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
scope="class"
|
scope="class"
|
||||||
)
|
)
|
||||||
|
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
@pytest.mark.usefixtures("create_profiles")
|
|
||||||
class TestToggleWifiMode(object):
|
class TestToggleWifiMode(object):
|
||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_ToogleWifiMode_5g_WPA2_Personal(self, setup_profile_data, get_ToggleWifiMode_data, setup_perfectoMobile_android):
|
def test_ToogleWifiMode_5g_WPA2_Personal(self, get_ToggleWifiMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -49,16 +61,16 @@ class TestToggleWifiMode(object):
|
|||||||
set_APconnMobileDevice_android(ssidName, ssidPassword, setup_perfectoMobile_android, connData)
|
set_APconnMobileDevice_android(ssidName, ssidPassword, setup_perfectoMobile_android, connData)
|
||||||
|
|
||||||
#Toggle Wifi Mode
|
#Toggle Wifi Mode
|
||||||
assert Toggle_WifiMode_android(setup_perfectoMobile_android, ssidName, connData)
|
Toggle_WifiMode_android(setup_perfectoMobile_android, ssidName, connData)
|
||||||
|
|
||||||
#ForgetWifi
|
#ForgetWifi
|
||||||
ForgetWifiConnection(setup_perfectoMobile_android, ssidName, connData)
|
ForgetWifiConnection(setup_perfectoMobile_android, ssidName, connData)
|
||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_ToogleWifiMode_2g_WPA2_Personal(self, setup_profile_data, get_ToggleWifiMode_data, setup_perfectoMobile_android):
|
def test_ToogleWifiMode_2g_WPA2_Personal(self, get_ToggleWifiMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -79,9 +91,9 @@ class TestToggleWifiMode(object):
|
|||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_ToogleWifiMode_5g_WPA(self, setup_profile_data, get_ToggleWifiMode_data, setup_perfectoMobile_android):
|
def test_ToogleWifiMode_5g_WPA(self, get_ToggleWifiMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -102,9 +114,9 @@ class TestToggleWifiMode(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_ToogleWifiMode_2g_WPA(self, setup_profile_data, get_ToggleWifiMode_data, setup_perfectoMobile_android):
|
def test_ToogleWifiMode_2g_WPA(self, get_ToggleWifiMode_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
|||||||
@@ -11,32 +11,43 @@ from appium import webdriver
|
|||||||
from selenium.common.exceptions import NoSuchElementException
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
#pytestmark = [pytest.mark.ClientConnectivity, pytest.mark.nat, pytest.mark.interop]
|
import allure
|
||||||
|
|
||||||
if 'perfecto_libs' not in sys.path:
|
if 'perfecto_libs' not in sys.path:
|
||||||
sys.path.append(f'../libs/perfecto_libs')
|
sys.path.append(f'../libs/perfecto_libs')
|
||||||
|
|
||||||
from android_lib import closeApp, set_APconnMobileDevice_android, verifyUploadDownloadSpeed_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, setup_perfectoMobile_android
|
from android_lib import closeApp, set_APconnMobileDevice_android, verifyUploadDownloadSpeed_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, setup_perfectoMobile_android
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "NAT",
|
||||||
|
"ssid_modes": {
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
|
||||||
|
"rf": {},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
@pytest.mark.ClientConnectivityAndroid
|
@pytest.mark.ClientConnectivityAndroid
|
||||||
@pytest.mark.wifi5
|
@pytest.mark.interop_and
|
||||||
@pytest.mark.wifi6
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setup_profiles, create_profiles',
|
'setup_profiles',
|
||||||
[(["NAT"], ["NAT"])],
|
[setup_params_general],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
scope="class"
|
scope="class"
|
||||||
)
|
)
|
||||||
|
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
@pytest.mark.usefixtures("create_profiles")
|
|
||||||
class TestNatMode(object):
|
class TestNatMode(object):
|
||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_ClientConnectivity_5g_WPA2_Personal(self, setup_profile_data, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
def test_ClientConnectivity_5g_WPA2_Personal(self, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -57,9 +68,9 @@ class TestNatMode(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_ClientConnectivity_2g_WPA2_Personal(self, setup_profile_data, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
def test_ClientConnectivity_2g_WPA2_Personal(self, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -80,9 +91,9 @@ class TestNatMode(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_ClientConnectivity_2g_WPA(self, setup_profile_data, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
def test_ClientConnectivity_2g_WPA(self, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -103,9 +114,9 @@ class TestNatMode(object):
|
|||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_ClientConnectivity_5g_WPA(self, setup_profile_data, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
def test_ClientConnectivity_5g_WPA(self, get_APToMobileDevice_data, setup_perfectoMobile_android):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
|||||||
@@ -44,8 +44,6 @@ from configuration import CONFIGURATION
|
|||||||
|
|
||||||
from urllib3 import exceptions
|
from urllib3 import exceptions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="class")
|
@pytest.fixture(scope="class")
|
||||||
def setup_perfectoMobileWeb(request):
|
def setup_perfectoMobileWeb(request):
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
@@ -110,8 +108,6 @@ def setup_perfectoMobile_iOS(request):
|
|||||||
warnings.simplefilter("ignore", ResourceWarning)
|
warnings.simplefilter("ignore", ResourceWarning)
|
||||||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
capabilities = {
|
capabilities = {
|
||||||
'platformName': request.config.getini("platformName-iOS"),
|
'platformName': request.config.getini("platformName-iOS"),
|
||||||
'model': request.config.getini("model-iOS"),
|
'model': request.config.getini("model-iOS"),
|
||||||
@@ -119,8 +115,8 @@ def setup_perfectoMobile_iOS(request):
|
|||||||
#'automationName' : 'Appium',
|
#'automationName' : 'Appium',
|
||||||
'securityToken' : request.config.getini("securityToken"),
|
'securityToken' : request.config.getini("securityToken"),
|
||||||
'useAppiumForWeb' : 'false',
|
'useAppiumForWeb' : 'false',
|
||||||
'useAppiumForHybrid' : 'false',
|
|
||||||
#'bundleId' : request.config.getini("bundleId-iOS"),
|
#'bundleId' : request.config.getini("bundleId-iOS"),
|
||||||
|
'useAppiumForHybrid' : 'false',
|
||||||
}
|
}
|
||||||
|
|
||||||
driver = webdriver.Remote('https://'+request.config.getini("perfectoURL")+'.perfectomobile.com/nexperience/perfectomobile/wd/hub', capabilities)
|
driver = webdriver.Remote('https://'+request.config.getini("perfectoURL")+'.perfectomobile.com/nexperience/perfectomobile/wd/hub', capabilities)
|
||||||
@@ -128,8 +124,13 @@ def setup_perfectoMobile_iOS(request):
|
|||||||
|
|
||||||
TestCaseFullName = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
|
TestCaseFullName = os.environ.get('PYTEST_CURRENT_TEST').split(':')[-1].split(' ')[0]
|
||||||
nCurrentTestMethodNameSplit = re.sub(r'\[.*?\]\ *', "", TestCaseFullName)
|
nCurrentTestMethodNameSplit = re.sub(r'\[.*?\]\ *', "", TestCaseFullName)
|
||||||
|
try:
|
||||||
TestCaseName = nCurrentTestMethodNameSplit.removeprefix('test_')
|
TestCaseName = nCurrentTestMethodNameSplit.removeprefix('test_')
|
||||||
#print ("\nTestCaseName: " + TestCaseName)
|
print ("\nTestCaseName: " + TestCaseName)
|
||||||
|
except Exception as e:
|
||||||
|
TestCaseName = nCurrentTestMethodNameSplit
|
||||||
|
print("\nUpgrade Python to 3.9 to avoid test_ string in your test case name, see below URL")
|
||||||
|
print("https://www.andreagrandi.it/2020/10/11/python39-introduces-removeprefix-removesuffix/")
|
||||||
|
|
||||||
projectname = request.config.getini("projectName")
|
projectname = request.config.getini("projectName")
|
||||||
projectversion = request.config.getini("projectVersion")
|
projectversion = request.config.getini("projectVersion")
|
||||||
@@ -145,12 +146,36 @@ def setup_perfectoMobile_iOS(request):
|
|||||||
|
|
||||||
def teardown():
|
def teardown():
|
||||||
try:
|
try:
|
||||||
print(" -- Tear Down --")
|
print("\n\n---------- Tear Down ----------")
|
||||||
|
|
||||||
|
testFailed = request.session.testsfailed
|
||||||
|
if testFailed>0:
|
||||||
|
print ("Test Case Failure, please check report link: " + testCaseName)
|
||||||
|
reporting_client.test_stop(TestResultFactory.create_failure("Exception See Test Case"))
|
||||||
|
#seen = {None}
|
||||||
|
#session = request.node
|
||||||
|
#print(session)
|
||||||
|
elif testFailed<=0:
|
||||||
reporting_client.test_stop(TestResultFactory.create_success())
|
reporting_client.test_stop(TestResultFactory.create_success())
|
||||||
print('Report-Url: ' + reporting_client.report_url() + '\n')
|
|
||||||
|
#amount = len(request.session.items)
|
||||||
|
#print("Test Session Items: ")
|
||||||
|
#print(amount)
|
||||||
|
|
||||||
|
#tests_count = request.session.testscollected
|
||||||
|
#print("Test Collected: ")
|
||||||
|
#print(tests_count)
|
||||||
|
|
||||||
|
print('Report-Url: ' + reporting_client.report_url())
|
||||||
|
print("----------------------------------------------------------")
|
||||||
driver.close()
|
driver.close()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(" -- Exception Not Able To close --")
|
print(" -- Exception While Tear Down --")
|
||||||
|
reporting_client.test_stop(TestResultFactory.create_failure("Exception"))
|
||||||
|
print('Report-Url-Failure: ' + reporting_client.report_url() + '\n')
|
||||||
|
|
||||||
|
driver.close()
|
||||||
|
|
||||||
print (e.message)
|
print (e.message)
|
||||||
finally:
|
finally:
|
||||||
try:
|
try:
|
||||||
@@ -722,3 +747,15 @@ def update_ssid(request, instantiate_profile, setup_profile_data):
|
|||||||
requested_profile[3]
|
requested_profile[3]
|
||||||
time.sleep(90)
|
time.sleep(90)
|
||||||
yield status
|
yield status
|
||||||
|
|
||||||
|
|
||||||
|
#@pytest.fixture(scope="module", autouse=True)
|
||||||
|
def failure_tracking_fixture(request):
|
||||||
|
tests_failed_before_module = request.session.testsfailed
|
||||||
|
print("\n\ntests_failed_before_module: ")
|
||||||
|
print(tests_failed_before_module)
|
||||||
|
tests_failed_during_module = request.session.testsfailed - tests_failed_before_module
|
||||||
|
print("tests_failed_during_module: ")
|
||||||
|
print(tests_failed_during_module)
|
||||||
|
yield tests_failed_during_module
|
||||||
|
|
||||||
@@ -11,31 +11,43 @@ from appium import webdriver
|
|||||||
from selenium.common.exceptions import NoSuchElementException
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import allure
|
||||||
|
|
||||||
if 'perfecto_libs' not in sys.path:
|
if 'perfecto_libs' not in sys.path:
|
||||||
sys.path.append(f'../libs/perfecto_libs')
|
sys.path.append(f'../libs/perfecto_libs')
|
||||||
|
|
||||||
from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "NAT",
|
||||||
|
"ssid_modes": {
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
|
||||||
|
"rf": {},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
@pytest.mark.AccessPassPointConnectivety
|
@pytest.mark.AccessPassPointConnectivety
|
||||||
@pytest.mark.wifi5
|
@pytest.mark.interop_iOS
|
||||||
@pytest.mark.wifi6
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setup_profiles, create_profiles',
|
'setup_profiles',
|
||||||
[(["NAT"], ["NAT"])],
|
[setup_params_general],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
scope="class"
|
scope="class"
|
||||||
)
|
)
|
||||||
|
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
@pytest.mark.usefixtures("create_profiles")
|
|
||||||
class TestAccessPointConnectivety(object):
|
class TestAccessPointConnectivety(object):
|
||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_AccessPointConnection_5g_WPA2_Personal(self, setup_profile_data, get_AccessPointConn_data, setup_perfectoMobile_iOS):
|
def test_AccessPointConnection_5g_WPA2_Personal(self, get_AccessPointConn_data, setup_perfectoMobile_iOS):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -61,9 +73,9 @@ class TestAccessPointConnectivety(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_AccessPointConnection_2g_WPA2_Personal(self, setup_profile_data, get_AccessPointConn_data, setup_perfectoMobile_iOS):
|
def test_AccessPointConnection_2g_WPA2_Personal(self, get_AccessPointConn_data, setup_perfectoMobile_iOS):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -89,9 +101,9 @@ class TestAccessPointConnectivety(object):
|
|||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_AccessPointConnection_5g_WPA(self, setup_profile_data, get_AccessPointConn_data, setup_perfectoMobile_iOS):
|
def test_AccessPointConnection_5g_WPA(self, get_AccessPointConn_data, setup_perfectoMobile_iOS):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -117,9 +129,9 @@ class TestAccessPointConnectivety(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_AccessPointConnection_2g_WPA(self, setup_profile_data, get_AccessPointConn_data, setup_perfectoMobile_iOS):
|
def test_AccessPointConnection_2g_WPA(self, get_AccessPointConn_data, setup_perfectoMobile_iOS):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
|||||||
@@ -23,18 +23,16 @@ setup_params_general = {
|
|||||||
"mode": "NAT",
|
"mode": "NAT",
|
||||||
"ssid_modes": {
|
"ssid_modes": {
|
||||||
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
|
||||||
"security_key": "something"}],
|
|
||||||
"wpa2_personal": [
|
"wpa2_personal": [
|
||||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
|
||||||
"security_key": "something"}]},
|
|
||||||
"rf": {},
|
"rf": {},
|
||||||
"radius": False
|
"radius": False
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.ToggleAirplaneMode
|
@pytest.mark.ToggleAirplaneMode
|
||||||
|
@pytest.mark.interop_iOS
|
||||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setup_profiles',
|
'setup_profiles',
|
||||||
@@ -42,13 +40,13 @@ setup_params_general = {
|
|||||||
indirect=True,
|
indirect=True,
|
||||||
scope="class"
|
scope="class"
|
||||||
)
|
)
|
||||||
|
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
class TestToggleAirplaneMode(object):
|
class TestToggleAirplaneMode(object):
|
||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_ToogleAirplaneMode_5g_WPA2_Personal(self, get_ToggleAirplaneMode_data,
|
def test_ToogleAirplaneMode_5g_WPA2_Personal(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS):
|
||||||
setup_perfectoMobile_iOS):
|
|
||||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
@@ -61,6 +59,8 @@ class TestToggleAirplaneMode(object):
|
|||||||
|
|
||||||
# Set Wifi/AP Mode
|
# Set Wifi/AP Mode
|
||||||
set_APconnMobileDevice_iOS(ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
set_APconnMobileDevice_iOS(ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||||
|
#print("ReportFlag: " + resultFlag)
|
||||||
|
#setReportResultFlag(resultFlag)
|
||||||
|
|
||||||
# Toggle AirplaneMode
|
# Toggle AirplaneMode
|
||||||
Toggle_AirplaneMode_iOS(setup_perfectoMobile_iOS, connData)
|
Toggle_AirplaneMode_iOS(setup_perfectoMobile_iOS, connData)
|
||||||
@@ -73,9 +73,8 @@ class TestToggleAirplaneMode(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_ToogleAirplaneMode_2g_WPA2_Personal(self, setup_profile_data, get_ToggleAirplaneMode_data,
|
def test_ToogleAirplaneMode_2g_WPA2_Personal(self, get_ToggleAirplaneMode_data,setup_perfectoMobile_iOS):
|
||||||
setup_perfectoMobile_iOS):
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print("SSID_NAME: " + ssidName)
|
print("SSID_NAME: " + ssidName)
|
||||||
@@ -87,6 +86,9 @@ class TestToggleAirplaneMode(object):
|
|||||||
|
|
||||||
# Set Wifi/AP Mode
|
# Set Wifi/AP Mode
|
||||||
set_APconnMobileDevice_iOS(ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
set_APconnMobileDevice_iOS(ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||||
|
#print("ResultFlag: " + resultFlag)
|
||||||
|
# print(resultFlag)
|
||||||
|
# reportResultFlag.reportFlag = resultFlag
|
||||||
|
|
||||||
# Toggle AirplaneMode
|
# Toggle AirplaneMode
|
||||||
Toggle_AirplaneMode_iOS(setup_perfectoMobile_iOS, connData)
|
Toggle_AirplaneMode_iOS(setup_perfectoMobile_iOS, connData)
|
||||||
@@ -99,8 +101,8 @@ class TestToggleAirplaneMode(object):
|
|||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_ToogleAirplaneMode_5g_WPA(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS):
|
def test_ToogleAirplaneMode_5g_WPA(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS):
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print("SSID_NAME: " + ssidName)
|
print("SSID_NAME: " + ssidName)
|
||||||
@@ -124,8 +126,8 @@ class TestToggleAirplaneMode(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_ToogleAirplaneMode_2g_WPA(self, setup_profile_data, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS):
|
def test_ToogleAirplaneMode_2g_WPA(self, get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS):
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print("SSID_NAME: " + ssidName)
|
print("SSID_NAME: " + ssidName)
|
||||||
|
|||||||
138
tests/e2e/interOp/iOS/OpenRoamingPassPoint/test_OpenRoaming.py
Normal file
138
tests/e2e/interOp/iOS/OpenRoamingPassPoint/test_OpenRoaming.py
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
from logging import exception
|
||||||
|
import unittest
|
||||||
|
import warnings
|
||||||
|
from perfecto.test import TestResultFactory
|
||||||
|
import pytest
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
from selenium.webdriver.common.by import By
|
||||||
|
from appium import webdriver
|
||||||
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import allure
|
||||||
|
|
||||||
|
if 'perfecto_libs' not in sys.path:
|
||||||
|
sys.path.append(f'../libs/perfecto_libs')
|
||||||
|
|
||||||
|
from iOS_lib import closeApp, openApp, verifyUploadDownloadSpeediOS, ForgetWifiConnection, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "NAT",
|
||||||
|
"ssid_modes": {
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
|
||||||
|
"rf": {},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
|
@pytest.mark.OpenRoaming
|
||||||
|
#@pytest.mark.interop_iOS
|
||||||
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
'setup_profiles',
|
||||||
|
[setup_params_general],
|
||||||
|
indirect=True,
|
||||||
|
scope="class"
|
||||||
|
)
|
||||||
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
|
class TestOpenRoaming(object):
|
||||||
|
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
def test_OpenRoaming_5g_WPA2_Personal(self, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
|
||||||
|
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
|
ssidName = profile_data["ssid_name"]
|
||||||
|
ssidPassword = profile_data["security_key"]
|
||||||
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
print ("SSID_PASS: " + ssidPassword)
|
||||||
|
|
||||||
|
report = setup_perfectoMobile_iOS[1]
|
||||||
|
driver = setup_perfectoMobile_iOS[0]
|
||||||
|
connData = get_APToMobileDevice_data
|
||||||
|
|
||||||
|
#Set Wifi/AP Mode
|
||||||
|
set_APconnMobileDevice_iOS(ssidName, ssidPassword, setup_perfectoMobile_iOS, connData)
|
||||||
|
|
||||||
|
#Install Profile
|
||||||
|
|
||||||
|
#Verify Upload download Speed from device Selection
|
||||||
|
verifyUploadDownloadSpeediOS(setup_perfectoMobile_iOS, connData)
|
||||||
|
|
||||||
|
#ForgetWifi
|
||||||
|
ForgetWifiConnection(setup_perfectoMobile_iOS, ssidName, connData)
|
||||||
|
|
||||||
|
@pytest.mark.twog
|
||||||
|
@pytest.mark.wpa2_personal
|
||||||
|
def test_OpenRoaming_2g_WPA2_Personal(self, get_APToMobileDevice_data, setup_perfectoMobileWeb):
|
||||||
|
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
|
ssidName = profile_data["ssid_name"]
|
||||||
|
ssidPassword = profile_data["security_key"]
|
||||||
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
print ("SSID_PASS: " + ssidPassword)
|
||||||
|
|
||||||
|
report = setup_perfectoMobileWeb[1]
|
||||||
|
driver = setup_perfectoMobileWeb[0]
|
||||||
|
connData = get_APToMobileDevice_data
|
||||||
|
|
||||||
|
#Set Wifi/AP Mode
|
||||||
|
set_APconnMobileDevice_iOS(ssidName, ssidPassword, setup_perfectoMobileWeb, connData)
|
||||||
|
|
||||||
|
#Verify Upload download Speed from device Selection
|
||||||
|
assert verifyUploadDownloadSpeediOS(setup_perfectoMobileWeb, connData)
|
||||||
|
|
||||||
|
#ForgetWifi
|
||||||
|
ForgetWifiConnection(setup_perfectoMobileWeb, ssidName, connData)
|
||||||
|
|
||||||
|
@pytest.mark.twog
|
||||||
|
@pytest.mark.wpa
|
||||||
|
def test_OpenRoaming_2g_WPA(self, get_APToMobileDevice_data, setup_perfectoMobileWeb):
|
||||||
|
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||||
|
ssidName = profile_data["ssid_name"]
|
||||||
|
ssidPassword = profile_data["security_key"]
|
||||||
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
print ("SSID_PASS: " + ssidPassword)
|
||||||
|
|
||||||
|
report = setup_perfectoMobileWeb[1]
|
||||||
|
driver = setup_perfectoMobileWeb[0]
|
||||||
|
connData = get_APToMobileDevice_data
|
||||||
|
|
||||||
|
#Set Wifi/AP Mode
|
||||||
|
set_APconnMobileDevice_iOS(ssidName, ssidPassword, setup_perfectoMobileWeb, connData)
|
||||||
|
|
||||||
|
#Verify Upload download Speed from device Selection
|
||||||
|
verifyUploadDownloadSpeediOS(setup_perfectoMobileWeb, connData)
|
||||||
|
|
||||||
|
#ForgetWifi
|
||||||
|
ForgetWifiConnection(setup_perfectoMobileWeb, ssidName, connData)
|
||||||
|
|
||||||
|
@pytest.mark.fiveg
|
||||||
|
@pytest.mark.wpa
|
||||||
|
def test_OpenRoaming_5g_WPA(self, get_APToMobileDevice_data, setup_perfectoMobileWeb):
|
||||||
|
|
||||||
|
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||||
|
ssidName = profile_data["ssid_name"]
|
||||||
|
ssidPassword = profile_data["security_key"]
|
||||||
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
print ("SSID_PASS: " + ssidPassword)
|
||||||
|
|
||||||
|
report = setup_perfectoMobileWeb[1]
|
||||||
|
driver = setup_perfectoMobileWeb[0]
|
||||||
|
connData = get_APToMobileDevice_data
|
||||||
|
|
||||||
|
#Set Wifi/AP Mode
|
||||||
|
set_APconnMobileDevice_iOS(ssidName, ssidPassword, setup_perfectoMobileWeb, connData)
|
||||||
|
|
||||||
|
#Verify Upload download Speed from device Selection
|
||||||
|
verifyUploadDownloadSpeediOS(setup_perfectoMobileWeb, connData)
|
||||||
|
|
||||||
|
#ForgetWifi
|
||||||
|
ForgetWifiConnection(setup_perfectoMobileWeb, ssidName, connData)
|
||||||
@@ -9,35 +9,47 @@ from selenium.common.exceptions import NoSuchElementException
|
|||||||
from selenium.webdriver.common.by import By
|
from selenium.webdriver.common.by import By
|
||||||
from appium import webdriver
|
from appium import webdriver
|
||||||
from selenium.common.exceptions import NoSuchElementException
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
from urllib3 import exceptions
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import allure
|
||||||
|
|
||||||
from urllib3 import exceptions
|
|
||||||
|
|
||||||
if 'perfecto_libs' not in sys.path:
|
if 'perfecto_libs' not in sys.path:
|
||||||
sys.path.append(f'../libs/perfecto_libs')
|
sys.path.append(f'../libs/perfecto_libs')
|
||||||
|
|
||||||
from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "NAT",
|
||||||
|
"ssid_modes": {
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
|
||||||
|
"rf": {},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
@pytest.mark.PassPointConnection
|
@pytest.mark.PassPointConnection
|
||||||
@pytest.mark.wifi5
|
@pytest.mark.interop_iOS
|
||||||
@pytest.mark.wifi6
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setup_profiles, create_profiles',
|
'setup_profiles',
|
||||||
[(["NAT"], ["NAT"])],
|
[setup_params_general],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
scope="class"
|
scope="class"
|
||||||
)
|
)
|
||||||
|
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
@pytest.mark.usefixtures("create_profiles")
|
|
||||||
class TestPassPointConnection(object):
|
class TestPassPointConnection(object):
|
||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_PassPointConnection_5g_WPA2_Personal(self,setup_profile_data, setup_perfectoMobile_iOS, get_PassPointConniOS_data):
|
def test_PassPointConnection_5g_WPA2_Personal(self, setup_perfectoMobile_iOS, get_PassPointConniOS_data):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -61,9 +73,9 @@ class TestPassPointConnection(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_PassPointConnection_2g_WPA2_Personal(self,setup_profile_data, setup_perfectoMobile_iOS, get_PassPointConniOS_data):
|
def test_PassPointConnection_2g_WPA2_Personal(self, setup_perfectoMobile_iOS, get_PassPointConniOS_data):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -87,9 +99,9 @@ class TestPassPointConnection(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_PassPointConnection_2g_WPA(self,setup_profile_data, setup_perfectoMobile_iOS, get_PassPointConniOS_data):
|
def test_PassPointConnection_2g_WPA(self, setup_perfectoMobile_iOS, get_PassPointConniOS_data):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -113,9 +125,9 @@ class TestPassPointConnection(object):
|
|||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_PassPointConnection_5g_WPA(self,setup_profile_data, setup_perfectoMobile_iOS, get_PassPointConniOS_data):
|
def test_PassPointConnection_5g_WPA(self, setup_perfectoMobile_iOS, get_PassPointConniOS_data):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
|||||||
@@ -11,31 +11,43 @@ from appium import webdriver
|
|||||||
from selenium.common.exceptions import NoSuchElementException
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import allure
|
||||||
|
|
||||||
if 'perfecto_libs' not in sys.path:
|
if 'perfecto_libs' not in sys.path:
|
||||||
sys.path.append(f'../libs/perfecto_libs')
|
sys.path.append(f'../libs/perfecto_libs')
|
||||||
|
|
||||||
from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "NAT",
|
||||||
|
"ssid_modes": {
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
|
||||||
|
"rf": {},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
@pytest.mark.ToggleWifiMode
|
@pytest.mark.ToggleWifiMode
|
||||||
@pytest.mark.wifi5
|
@pytest.mark.interop_iOS
|
||||||
@pytest.mark.wifi6
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setup_profiles, create_profiles',
|
'setup_profiles',
|
||||||
[(["NAT"], ["NAT"])],
|
[setup_params_general],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
scope="class"
|
scope="class"
|
||||||
)
|
)
|
||||||
|
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
@pytest.mark.usefixtures("create_profiles")
|
|
||||||
class TestToggleWifiMode(object):
|
class TestToggleWifiMode(object):
|
||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_ToogleWifiMode_5g_WPA2_Personal(self, setup_profile_data, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
def test_ToogleWifiMode_5g_WPA2_Personal(self, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -60,9 +72,9 @@ class TestToggleWifiMode(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_ToogleWifiMode_2g_WPA2_Personal(self, setup_profile_data, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
def test_ToogleWifiMode_2g_WPA2_Personal(self, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -87,9 +99,9 @@ class TestToggleWifiMode(object):
|
|||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_ToogleWifiMode_5g_WPA(self, setup_profile_data, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
def test_ToogleWifiMode_5g_WPA(self, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -114,9 +126,9 @@ class TestToggleWifiMode(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_ToogleWifiMode_2g_WPA(self, setup_profile_data, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
def test_ToogleWifiMode_2g_WPA(self, get_ToggleWifiMode_data, setup_perfectoMobile_iOS):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
|||||||
@@ -11,32 +11,43 @@ from appium import webdriver
|
|||||||
from selenium.common.exceptions import NoSuchElementException
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
#pytestmark = [pytest.mark.ClientConnectivity, pytest.mark.nat, pytest.mark.interop]
|
import allure
|
||||||
|
|
||||||
if 'perfecto_libs' not in sys.path:
|
if 'perfecto_libs' not in sys.path:
|
||||||
sys.path.append(f'../libs/perfecto_libs')
|
sys.path.append(f'../libs/perfecto_libs')
|
||||||
|
|
||||||
from iOS_lib import closeApp, openApp, verifyUploadDownloadSpeediOS, ForgetWifiConnection, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
from iOS_lib import closeApp, openApp, verifyUploadDownloadSpeediOS, ForgetWifiConnection, Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown
|
||||||
|
|
||||||
|
setup_params_general = {
|
||||||
|
"mode": "NAT",
|
||||||
|
"ssid_modes": {
|
||||||
|
"wpa": [{"ssid_name": "ssid_wpa_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}],
|
||||||
|
"wpa2_personal": [
|
||||||
|
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||||
|
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],"security_key": "something"}]},
|
||||||
|
"rf": {},
|
||||||
|
"radius": False
|
||||||
|
}
|
||||||
|
|
||||||
@pytest.mark.ClientConnectivity
|
@pytest.mark.ClientConnectivity
|
||||||
@pytest.mark.wifi5
|
@pytest.mark.interop_iOS
|
||||||
@pytest.mark.wifi6
|
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'setup_profiles, create_profiles',
|
'setup_profiles',
|
||||||
[(["NAT"], ["NAT"])],
|
[setup_params_general],
|
||||||
indirect=True,
|
indirect=True,
|
||||||
scope="class"
|
scope="class"
|
||||||
)
|
)
|
||||||
|
|
||||||
@pytest.mark.usefixtures("setup_profiles")
|
@pytest.mark.usefixtures("setup_profiles")
|
||||||
@pytest.mark.usefixtures("create_profiles")
|
|
||||||
class TestNatMode(object):
|
class TestNatMode(object):
|
||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_ClientConnectivity_5g_WPA2_Personal(self, setup_profile_data, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
|
def test_ClientConnectivity_5g_WPA2_Personal(self, get_APToMobileDevice_data, setup_perfectoMobile_iOS):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -57,9 +68,9 @@ class TestNatMode(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa2_personal
|
@pytest.mark.wpa2_personal
|
||||||
def test_ClientConnectivity_2g_WPA2_Personal(self, setup_profile_data, get_APToMobileDevice_data, setup_perfectoMobileWeb):
|
def test_ClientConnectivity_2g_WPA2_Personal(self, get_APToMobileDevice_data, setup_perfectoMobileWeb):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA2_P"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -80,9 +91,9 @@ class TestNatMode(object):
|
|||||||
|
|
||||||
@pytest.mark.twog
|
@pytest.mark.twog
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_ClientConnectivity_2g_WPA(self, setup_profile_data, get_APToMobileDevice_data, setup_perfectoMobileWeb):
|
def test_ClientConnectivity_2g_WPA(self, get_APToMobileDevice_data, setup_perfectoMobileWeb):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["2G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
@@ -103,9 +114,9 @@ class TestNatMode(object):
|
|||||||
|
|
||||||
@pytest.mark.fiveg
|
@pytest.mark.fiveg
|
||||||
@pytest.mark.wpa
|
@pytest.mark.wpa
|
||||||
def test_ClientConnectivity_5g_WPA(self, setup_profile_data, get_APToMobileDevice_data, setup_perfectoMobileWeb):
|
def test_ClientConnectivity_5g_WPA(self, get_APToMobileDevice_data, setup_perfectoMobileWeb):
|
||||||
|
|
||||||
profile_data = setup_profile_data["NAT"]["WPA"]["5G"]
|
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||||
ssidName = profile_data["ssid_name"]
|
ssidName = profile_data["ssid_name"]
|
||||||
ssidPassword = profile_data["security_key"]
|
ssidPassword = profile_data["security_key"]
|
||||||
print ("SSID_NAME: " + ssidName)
|
print ("SSID_NAME: " + ssidName)
|
||||||
|
|||||||
@@ -10,13 +10,11 @@ num_stations=1
|
|||||||
# Cloud SDK settings
|
# Cloud SDK settings
|
||||||
sdk-customer-id=2
|
sdk-customer-id=2
|
||||||
|
|
||||||
|
|
||||||
# Radius Settings
|
# Radius Settings
|
||||||
radius_server_ip=192.168.200.75
|
radius_server_ip=192.168.200.75
|
||||||
radius_port=1812
|
radius_port=1812
|
||||||
radius_secret=testing123
|
radius_secret=testing123
|
||||||
|
|
||||||
|
|
||||||
# Testrail Info
|
# Testrail Info
|
||||||
tr_url=https://telecominfraproject.testrail.com
|
tr_url=https://telecominfraproject.testrail.com
|
||||||
tr_user=cicd@tip.com
|
tr_user=cicd@tip.com
|
||||||
@@ -25,42 +23,42 @@ tr_project_id=WLAN
|
|||||||
tr_prefix=TIP_
|
tr_prefix=TIP_
|
||||||
milestone=29
|
milestone=29
|
||||||
|
|
||||||
|
|
||||||
filterwarnings =
|
|
||||||
ignore::UserWarning
|
|
||||||
|
|
||||||
markers =
|
|
||||||
sanity: Run the sanity for Client Connectivity test
|
|
||||||
|
|
||||||
|
|
||||||
#--- Perfecto parameters -----
|
#--- Perfecto parameters -----
|
||||||
perfectoURL=tip
|
perfectoURL=tip
|
||||||
securityToken=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJqdGkiOiJjYjRjYjQzYi05Y2FiLTQxNzQtOTYxYi04MDEwNTZkNDM2MzgiLCJleHAiOjAsIm5iZiI6MCwiaWF0IjoxNjExNTk0NzcxLCJpc3MiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwiYXVkIjoiaHR0cHM6Ly9hdXRoMi5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvdGlwLXBlcmZlY3RvbW9iaWxlLWNvbSIsInN1YiI6IjdiNTMwYWUwLTg4MTgtNDdiOS04M2YzLTdmYTBmYjBkZGI0ZSIsInR5cCI6Ik9mZmxpbmUiLCJhenAiOiJvZmZsaW5lLXRva2VuLWdlbmVyYXRvciIsIm5vbmNlIjoiZTRmOTY4NjYtZTE3NS00YzM2LWEyODMtZTQwMmI3M2U5NzhlIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiYWNkNTQ3MTctNzJhZC00MGU3LWI0ZDctZjlkMTAyNDRkNWZlIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInJlc291cmNlX2FjY2VzcyI6eyJyZXBvcnRpdW0iOnsicm9sZXMiOlsiYWRtaW5pc3RyYXRvciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.SOL-wlZiQ4BoLLfaeIW8QoxJ6xzrgxBjwSiSzkLBPYw
|
securityToken=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI3NzkzZGM0Ni1jZmU4LTQ4ODMtYjhiOS02ZWFlZGU2OTc2MDkifQ.eyJpYXQiOjE2MjE4NjgyOTksImp0aSI6IjIzNGFiOTM1LWIxYjQtNGZiOC1hZmJiLTM0OTQwNzU5MjIwMyIsImlzcyI6Imh0dHBzOi8vYXV0aDIucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL3RpcC1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgyLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy90aXAtcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiN2I1MzBhZTAtODgxOC00N2I5LTgzZjMtN2ZhMGZiMGRkYjRlIiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI1MzI2NDQxNS0xYTQwLTQ1ZTctOGVkMi1hOTNiYWZmZWNjYjIiLCJzZXNzaW9uX3N0YXRlIjoiY2YzY2JlOGMtY2Y5OC00NzRlLWJmODctYTIxNzU0NzVhM2EzIiwic2NvcGUiOiJvcGVuaWQgcHJvZmlsZSBvZmZsaW5lX2FjY2VzcyBlbWFpbCJ9.4a4v6AKxmY95Zb-l84K_Od49WPikwOHP7ryctfmnn-w
|
||||||
#PS Token
|
#PS Token
|
||||||
#securityToken=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIyODhhNDIyNS1jOTE1LTQwZDctOTc2YS04MDhiMWE3YTFmODYifQ.eyJpYXQiOjE2MjA4NTU1NTcsImp0aSI6IjNiMWJiNWNhLTkzOTgtNDViOC04YmZkLTAxNjdhNGZjNDY1NCIsImlzcyI6Imh0dHBzOi8vYXV0aC5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvcHMtcGVyZmVjdG9tb2JpbGUtY29tIiwiYXVkIjoiaHR0cHM6Ly9hdXRoLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy9wcy1wZXJmZWN0b21vYmlsZS1jb20iLCJzdWIiOiIzOTNiMzFhNC00MmJlLTQ2YjEtODkwZS1iZGU3NjdlYTNiNDYiLCJ0eXAiOiJPZmZsaW5lIiwiYXpwIjoib2ZmbGluZS10b2tlbi1nZW5lcmF0b3IiLCJub25jZSI6IjI3MTY4ZjBmLTdlMmItNGI3YS1hZjNjLWFhMGE1NjhkZjE2ZCIsInNlc3Npb25fc3RhdGUiOiJlOWZjZTQ5Mi05NDA3LTQ1ZDItYjU4NS02ZDFiNTAzYzM4ZTUiLCJzY29wZSI6Im9wZW5pZCBvZmZsaW5lX2FjY2VzcyJ9.Z_rJHVkrmR26fZ366yLUSkt2oZX4a8KN7IRCd_QG3qo
|
#securityToken=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIyODhhNDIyNS1jOTE1LTQwZDctOTc2YS04MDhiMWE3YTFmODYifQ.eyJpYXQiOjE2MjA4NTU1NTcsImp0aSI6IjNiMWJiNWNhLTkzOTgtNDViOC04YmZkLTAxNjdhNGZjNDY1NCIsImlzcyI6Imh0dHBzOi8vYXV0aC5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvcHMtcGVyZmVjdG9tb2JpbGUtY29tIiwiYXVkIjoiaHR0cHM6Ly9hdXRoLnBlcmZlY3RvbW9iaWxlLmNvbS9hdXRoL3JlYWxtcy9wcy1wZXJmZWN0b21vYmlsZS1jb20iLCJzdWIiOiIzOTNiMzFhNC00MmJlLTQ2YjEtODkwZS1iZGU3NjdlYTNiNDYiLCJ0eXAiOiJPZmZsaW5lIiwiYXpwIjoib2ZmbGluZS10b2tlbi1nZW5lcmF0b3IiLCJub25jZSI6IjI3MTY4ZjBmLTdlMmItNGI3YS1hZjNjLWFhMGE1NjhkZjE2ZCIsInNlc3Npb25fc3RhdGUiOiJlOWZjZTQ5Mi05NDA3LTQ1ZDItYjU4NS02ZDFiNTAzYzM4ZTUiLCJzY29wZSI6Im9wZW5pZCBvZmZsaW5lX2FjY2VzcyJ9.Z_rJHVkrmR26fZ366yLUSkt2oZX4a8KN7IRCd_QG3qo
|
||||||
#demo Cloud
|
#demo Cloud
|
||||||
#securityToken=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4YmI4YmZmZS1kMzBjLTQ2MjctYmMxMS0zNTYyMmY1ZDkyMGYifQ.eyJpYXQiOjE2MjA5MTMzMjAsImp0aSI6ImRkOWI3OTFiLTA5NzUtNGVhMC05NDczLWU2MjEzOThhN2U0NyIsImlzcyI6Imh0dHBzOi8vYXV0aC5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvZGVtby1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL2RlbW8tcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiZjAyNGVkZGItODZkMy00OTA5LThhZjQtOGY1OTA1Yzc5ZjA4IiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI5ZDdkMjI5Ny1lYzk1LTQ5NjUtYmRmMC1mZWJiYTk4NzI1MzUiLCJzZXNzaW9uX3N0YXRlIjoiMTI1NjFlMDQtMGUwMS00ZTYxLWE4NjMtMGQ2N2RhNzc1NjhiIiwic2NvcGUiOiJvcGVuaWQgb2ZmbGluZV9hY2Nlc3MifQ.voz1Fca_tOlPDMbIMsoPvTmZHBioeMUetA2sVsQ_SWw
|
#securityToken=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI4YmI4YmZmZS1kMzBjLTQ2MjctYmMxMS0zNTYyMmY1ZDkyMGYifQ.eyJpYXQiOjE2MjA5MTMzMjAsImp0aSI6ImRkOWI3OTFiLTA5NzUtNGVhMC05NDczLWU2MjEzOThhN2U0NyIsImlzcyI6Imh0dHBzOi8vYXV0aC5wZXJmZWN0b21vYmlsZS5jb20vYXV0aC9yZWFsbXMvZGVtby1wZXJmZWN0b21vYmlsZS1jb20iLCJhdWQiOiJodHRwczovL2F1dGgucGVyZmVjdG9tb2JpbGUuY29tL2F1dGgvcmVhbG1zL2RlbW8tcGVyZmVjdG9tb2JpbGUtY29tIiwic3ViIjoiZjAyNGVkZGItODZkMy00OTA5LThhZjQtOGY1OTA1Yzc5ZjA4IiwidHlwIjoiT2ZmbGluZSIsImF6cCI6Im9mZmxpbmUtdG9rZW4tZ2VuZXJhdG9yIiwibm9uY2UiOiI5ZDdkMjI5Ny1lYzk1LTQ5NjUtYmRmMC1mZWJiYTk4NzI1MzUiLCJzZXNzaW9uX3N0YXRlIjoiMTI1NjFlMDQtMGUwMS00ZTYxLWE4NjMtMGQ2N2RhNzc1NjhiIiwic2NvcGUiOiJvcGVuaWQgb2ZmbGluZV9hY2Nlc3MifQ.voz1Fca_tOlPDMbIMsoPvTmZHBioeMUetA2sVsQ_SWw
|
||||||
|
|
||||||
# Perfecto CI Report
|
# Perfecto CI Report
|
||||||
projectName = TIP-PyTest-Execution
|
projectName=TIP-PyTest-Execution
|
||||||
projectVersion = 1.0
|
projectVersion=1.0
|
||||||
jobName = Default_JobName
|
jobName=Tip-RajTest-Android
|
||||||
jobNumber = 1
|
jobNumber=2
|
||||||
reportTags = TestTag
|
reportTags=TestTag
|
||||||
|
|
||||||
# iOS Device Capabilities
|
# iOS Device Capabilities
|
||||||
platformName-iOS=iOS
|
|
||||||
#manufacturer-iOS=Apple
|
#manufacturer-iOS=Apple
|
||||||
model-iOS=iPhone.*
|
model-iOS=iPhone-XR
|
||||||
bundleId-iOS=com.apple.Preferences
|
bundleId-iOS=com.apple.Preferences
|
||||||
|
platformName-iOS=iOS
|
||||||
#default iOS settings app
|
#default iOS settings app
|
||||||
bundleId-iOS-Settings=com.apple.Preferences
|
bundleId-iOS-Settings=com.apple.Preferences
|
||||||
bundleId-iOS-Ping=com.deftapps.ping
|
bundleId-iOS-Ping=com.deftapps.ping
|
||||||
#browserType-iOS=Safari
|
#browserType-iOS=Safari
|
||||||
browserType-iOS=Safari
|
browserType-iOS=Safari
|
||||||
bundleId-iOS-Safari=com.apple.mobilesafari
|
bundleId-iOS-Safari=com.apple.mobilesafari
|
||||||
|
openRoamingURL=https://onboard.cicd.lab.wlan.tip.build/ATT-Profile.mobileconfig
|
||||||
# Android Device Capabilities
|
# Android Device Capabilities
|
||||||
platformName-android=Android
|
platformName-android=Android
|
||||||
model-android=.*
|
model-android=Galaxy S20
|
||||||
appPackage-android=com.android.settings
|
appPackage-android=com.android.settings
|
||||||
|
|
||||||
|
|
||||||
|
filterwarnings=ignore::UserWarning
|
||||||
|
|
||||||
|
markers=sanity: Run the sanity for Client Connectivity test
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user