mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-03 04:18:15 +00:00
wifi-capacity-test
This commit is contained in:
1
lanforge/lanforge-scripts
Submodule
1
lanforge/lanforge-scripts
Submodule
Submodule lanforge/lanforge-scripts added at 82a756834b
200
tests/configuration_1.py
Normal file
200
tests/configuration_1.py
Normal file
@@ -0,0 +1,200 @@
|
||||
|
||||
CONFIGURATION = {
|
||||
"basic-ext-03-01": {
|
||||
"controller": {
|
||||
'url': "https://wlan-portal-svc-nola-ext-03.cicd.lab.wlan.tip.build", # API base url for the controller
|
||||
'username': 'support@example.com',
|
||||
'password': 'support',
|
||||
'version': "1.1.0-SNAPSHOT",
|
||||
'commit_date': "2021-04-27"
|
||||
},
|
||||
'access_point': [
|
||||
{
|
||||
'model': 'ecw5410',
|
||||
'mode' : "wifi5",
|
||||
'serial': '903cb3944807',
|
||||
'jumphost': True,
|
||||
'ip': "192.168.200.230",
|
||||
'username': "lanforge",
|
||||
'password': "lanforge",
|
||||
'port': 22,
|
||||
'jumphost_tty': '/dev/ttyAP1',
|
||||
'version': "ecw5410-2021-04-26-pending-3fc41fa"
|
||||
}
|
||||
],
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"details": {
|
||||
"ip": "192.168.200.230",
|
||||
"port": 8080,
|
||||
"2.4G-Radio": ["wiphy0"],
|
||||
"5G-Radio": ["wiphy1"],
|
||||
"AX-Radio": ["wiphy2"],
|
||||
"upstream": "eth1",
|
||||
"2.4G-Station-Name": "wlan0",
|
||||
"5G-Station-Name": "wlan1",
|
||||
"AX-Station-Name": "ax",
|
||||
}
|
||||
}
|
||||
},
|
||||
"basic-ext-03-02": {
|
||||
"controller": {
|
||||
'url': "https://wlan-portal-svc-nola-ext-03.cicd.lab.wlan.tip.build", # API base url for the controller
|
||||
'username': 'support@example.com',
|
||||
'password': 'support',
|
||||
'version': "1.1.0-SNAPSHOT",
|
||||
'commit_date': "2021-04-27"
|
||||
},
|
||||
'access_point': [
|
||||
{
|
||||
'model': 'ecw5410',
|
||||
'mode': 'wifi5',
|
||||
'serial': '903cb394486f',
|
||||
'jumphost': True,
|
||||
'ip': "192.168.200.233",
|
||||
'username': "lanforge",
|
||||
'password': "lanforge",
|
||||
'port': 22,
|
||||
'jumphost_tty': '/dev/ttyAP1',
|
||||
'version': "ecw5410-2021-04-26-pending-3fc41fa"
|
||||
}
|
||||
],
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"details": {
|
||||
"ip": "192.168.200.233",
|
||||
"port": 8080,
|
||||
"2.4G-Radio": ["wiphy0"],
|
||||
"5G-Radio": ["wiphy1"],
|
||||
"AX-Radio": ["wiphy2"],
|
||||
"upstream": "eth1",
|
||||
"2.4G-Station-Name": "wlan0",
|
||||
"5G-Station-Name": "wlan1",
|
||||
"AX-Station-Name": "ax",
|
||||
}
|
||||
}
|
||||
},
|
||||
"basic-ext-03-03": {
|
||||
"controller": {
|
||||
'url': "https://wlan-portal-svc-nola-ext-03.cicd.lab.wlan.tip.build", # API base url for the controller
|
||||
'username': 'support@example.com',
|
||||
'password': 'support',
|
||||
'version': "1.1.0-SNAPSHOT",
|
||||
'commit_date': "2021-04-27"
|
||||
},
|
||||
'access_point': [
|
||||
{
|
||||
'model': 'ecw5410',
|
||||
'mode': 'wifi5',
|
||||
'serial': '903cb3944817',
|
||||
'jumphost': True,
|
||||
'ip': "192.168.200.80",
|
||||
'username': "lanforge",
|
||||
'password': "lanforge",
|
||||
'port': 22,
|
||||
'jumphost_tty': '/dev/ttyAP1',
|
||||
'version': "ecw5410-2021-04-26-pending-3fc41fa"
|
||||
}
|
||||
],
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"details": {
|
||||
"ip": "192.168.200.80",
|
||||
"port": 8080,
|
||||
"2.4G-Radio": ["wiphy0"],
|
||||
"5G-Radio": ["wiphy1"],
|
||||
"AX-Radio": ["wiphy2"],
|
||||
"upstream": "eth1",
|
||||
"2.4G-Station-Name": "wlan0",
|
||||
"5G-Station-Name": "wlan1",
|
||||
"AX-Station-Name": "ax",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
FIRMWARE = {
|
||||
# jFrog parameters
|
||||
"JFROG":
|
||||
{
|
||||
"jfrog-base-url": "https://tip.jFrog.io/artifactory/tip-wlan-ap-firmware",
|
||||
"username": "tip-read",
|
||||
"password": "tip-read",
|
||||
"build": "pending",
|
||||
"branch": "dev"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RADIUS_SERVER_DATA = {
|
||||
"ip": "192.168.200.75",
|
||||
"port": 1812,
|
||||
"secret": "testing123",
|
||||
"user": "nolaradius",
|
||||
"password": "nolastart",
|
||||
"pk_password": "whatever"
|
||||
}
|
||||
|
||||
TEST_CASES = {
|
||||
"ap_upgrade": 2233,
|
||||
"5g_wpa2_bridge": 2236,
|
||||
"2g_wpa2_bridge": 2237,
|
||||
"5g_wpa_bridge": 2419,
|
||||
"2g_wpa_bridge": 2420,
|
||||
"2g_wpa_nat": 4323,
|
||||
"5g_wpa_nat": 4324,
|
||||
"2g_wpa2_nat": 4325,
|
||||
"5g_wpa2_nat": 4326,
|
||||
"2g_eap_bridge": 5214,
|
||||
"5g_eap_bridge": 5215,
|
||||
"2g_eap_nat": 5216,
|
||||
"5g_eap_nat": 5217,
|
||||
"cloud_connection": 5222,
|
||||
"cloud_fw": 5247,
|
||||
"5g_wpa2_vlan": 5248,
|
||||
"5g_wpa_vlan": 5249,
|
||||
"5g_eap_vlan": 5250,
|
||||
"2g_wpa2_vlan": 5251,
|
||||
"2g_wpa_vlan": 5252,
|
||||
"2g_eap_vlan": 5253,
|
||||
"cloud_ver": 5540,
|
||||
"bridge_vifc": 5541,
|
||||
"nat_vifc": 5542,
|
||||
"vlan_vifc": 5543,
|
||||
"bridge_vifs": 5544,
|
||||
"nat_vifs": 5545,
|
||||
"vlan_vifs": 5546,
|
||||
"upgrade_api": 5547,
|
||||
"create_fw": 5548,
|
||||
"ap_bridge": 5641,
|
||||
"ap_nat": 5642,
|
||||
"ap_vlan": 5643,
|
||||
"ssid_2g_eap_bridge": 5644,
|
||||
"ssid_2g_wpa2_bridge": 5645,
|
||||
"ssid_2g_wpa_bridge": 5646,
|
||||
"ssid_5g_eap_bridge": 5647,
|
||||
"ssid_5g_wpa2_bridge": 5648,
|
||||
"ssid_5g_wpa_bridge": 5649,
|
||||
"ssid_2g_eap_nat": 5650,
|
||||
"ssid_2g_wpa2_nat": 5651,
|
||||
"ssid_2g_wpa_nat": 5652,
|
||||
"ssid_5g_eap_nat": 5653,
|
||||
"ssid_5g_wpa2_nat": 5654,
|
||||
"ssid_5g_wpa_nat": 5655,
|
||||
"ssid_2g_eap_vlan": 5656,
|
||||
"ssid_2g_wpa2_vlan": 5657,
|
||||
"ssid_2g_wpa_vlan": 5658,
|
||||
"ssid_5g_eap_vlan": 5659,
|
||||
"ssid_5g_wpa2_vlan": 5660,
|
||||
"ssid_5g_wpa_vlan": 5661,
|
||||
"radius_profile": 5808,
|
||||
"bridge_ssid_update": 8742,
|
||||
"nat_ssid_update": 8743,
|
||||
"vlan_ssid_update": 8744
|
||||
}
|
||||
# cmd = /bin/wlan_ap_redirector.sh ssl:opensync-redirector-nola-01.cicd.lab.wlan.tip.build:6643
|
||||
# radius server
|
||||
# radsec
|
||||
@@ -0,0 +1,139 @@
|
||||
import pytest
|
||||
import sys
|
||||
import time
|
||||
from lf_wifi_capacity_test import WiFiCapacityTest
|
||||
from create_station import CreateStation
|
||||
pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.bridge]
|
||||
|
||||
for folder in 'py-json', 'py-scripts':
|
||||
if folder not in sys.path:
|
||||
sys.path.append(f'../lanforge/lanforge-scripts/{folder}')
|
||||
|
||||
sys.path.append(f"../lanforge/lanforge-scripts/py-scripts/tip-cicd-sanity")
|
||||
|
||||
sys.path.append(f'../libs')
|
||||
sys.path.append(f'../libs/lanforge/')
|
||||
|
||||
from LANforge.LFUtils import *
|
||||
from sta_connect2 import StaConnect2
|
||||
from eap_connect import EAPConnect
|
||||
import allure
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"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
|
||||
}
|
||||
|
||||
|
||||
def lanforge_ip(args):
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.basic
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
class TestWifiCapacityBridgeMode(object):
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.mutto
|
||||
@pytest.mark.twog
|
||||
def test_client_wpa_2g(self, test_cases,lf_test):
|
||||
print("********** test_client_wpa_2g ***********")
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
print(profile_data)
|
||||
|
||||
'''create_station = CreateStation(_host = lf_test.lanforge_ip,
|
||||
_port = lf_test.lanforge_port,
|
||||
_ssid = profile_data["ssid_name"],
|
||||
_password = profile_data["security_key"],
|
||||
_security = "wpa",
|
||||
_sta_list = ['1.1.sta0000','1.1.sta0001'],
|
||||
_radio = lf_test.twog_radios)
|
||||
create_station.build()
|
||||
time.sleep(20)'''
|
||||
PASS = lf_test.wifi_capacity( ssid = profile_data["ssid_name"], paswd = profile_data["security_key"],
|
||||
security = "wpa", mode = "BRIDGE", band = "twog", instance_name = "wct_instance", )
|
||||
assert PASS
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.fiveg
|
||||
def test_client_wpa_5g(self, test_cases, lf_test):
|
||||
print("********** test_client_wpa_5g ***********")
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
print(profile_data)
|
||||
|
||||
'''create_station = CreateStation(_host=lf_test.lanforge_ip,
|
||||
_port=lf_test.lanforge_port,
|
||||
_ssid=profile_data["ssid_name"],
|
||||
_password=profile_data["security_key"],
|
||||
_security="wpa",
|
||||
_sta_list=['1.1.sta0000', '1.1.sta0001'],
|
||||
_radio=lf_test.fiveg_radios)
|
||||
create_station.build()
|
||||
time.sleep(20)'''
|
||||
PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
|
||||
security="wpa", mode="BRIDGE", band="fiveg",
|
||||
instance_name="wct_instance", )
|
||||
assert PASS
|
||||
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
def test_client_wpa2_personal_2g(self, test_cases,lf_test):
|
||||
print("********** test_client_wpa2_personal_2g ***********")
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
print(profile_data)
|
||||
|
||||
'''create_station = CreateStation(_host = lf_test.lanforge_ip,
|
||||
_port = lf_test.lanforge_port,
|
||||
_ssid = profile_data["ssid_name"],
|
||||
_password = profile_data["security_key"],
|
||||
_security = "wpa2",
|
||||
_sta_list = ['1.1.sta0000','1.1.sta0001'],
|
||||
_radio = lf_test.twog_radios)
|
||||
create_station.build()
|
||||
time.sleep(20)'''
|
||||
PASS = lf_test.wifi_capacity( ssid = profile_data["ssid_name"], paswd = profile_data["security_key"],
|
||||
security = "wpa2", mode = "BRIDGE", band = "twog",
|
||||
instance_name = "wct_instance", )
|
||||
assert PASS
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_client_wpa2_personal_5g(self, test_cases, lf_test):
|
||||
print("********** test_client_wpa2_personal_5g ***********")
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
print(profile_data)
|
||||
|
||||
'''create_station = CreateStation(_host=lf_test.lanforge_ip,
|
||||
_port=lf_test.lanforge_port,
|
||||
_ssid=profile_data["ssid_name"],
|
||||
_password=profile_data["security_key"],
|
||||
_security="wpa2",
|
||||
_sta_list=['1.1.sta0000', '1.1.sta0001'],
|
||||
_radio=lf_test.fiveg_radios)
|
||||
create_station.build()
|
||||
time.sleep(20)'''
|
||||
PASS = lf_test.wifi_capacity( ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
|
||||
security="wpa2", mode="BRIDGE", band="fiveg",
|
||||
instance_name="wct_instance", )
|
||||
assert PASS
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class TestWifiCapacityNatMode(object):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
print(profile_data)
|
||||
|
||||
create_station = CreateStation(_host = lf_test.lanforge_ip,
|
||||
'''create_station = CreateStation(_host = lf_test.lanforge_ip,
|
||||
_port = lf_test.lanforge_port,
|
||||
_ssid = profile_data["ssid_name"],
|
||||
_password = profile_data["security_key"],
|
||||
@@ -67,10 +67,9 @@ class TestWifiCapacityNatMode(object):
|
||||
_sta_list = ['1.1.sta0000','1.1.sta0001'],
|
||||
_radio = lf_test.twog_radios)
|
||||
create_station.build()
|
||||
time.sleep(20)
|
||||
PASS = lf_test.wifi_capacity(self, ssid = profile_data["ssid_name"], passkey = profile_data["security_key"],
|
||||
security = "wpa", station_name = [], mode = "NAT", band = "twog",
|
||||
instance_name = "wct_instance", )
|
||||
time.sleep(20)'''
|
||||
PASS = lf_test.wifi_capacity(ssid = profile_data["ssid_name"], paswd = profile_data["security_key"],
|
||||
security = "wpa", mode = "NAT", band = "twog", instance_name = "wct_instance", )
|
||||
assert PASS
|
||||
|
||||
@pytest.mark.wpa
|
||||
@@ -80,7 +79,7 @@ class TestWifiCapacityNatMode(object):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
print(profile_data)
|
||||
|
||||
create_station = CreateStation(_host=lf_test.lanforge_ip,
|
||||
'''create_station = CreateStation(_host=lf_test.lanforge_ip,
|
||||
_port=lf_test.lanforge_port,
|
||||
_ssid=profile_data["ssid_name"],
|
||||
_password=profile_data["security_key"],
|
||||
@@ -88,9 +87,9 @@ class TestWifiCapacityNatMode(object):
|
||||
_sta_list=['1.1.sta0000', '1.1.sta0001'],
|
||||
_radio=lf_test.fiveg_radios)
|
||||
create_station.build()
|
||||
time.sleep(20)
|
||||
PASS = lf_test.wifi_capacity(self, ssid=profile_data["ssid_name"], passkey=profile_data["security_key"],
|
||||
security="wpa", station_name=[], mode="NAT", band="fiveg",
|
||||
time.sleep(20)'''
|
||||
PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
|
||||
security="wpa", mode="NAT", band="fiveg",
|
||||
instance_name="wct_instance", )
|
||||
assert PASS
|
||||
|
||||
@@ -102,7 +101,7 @@ class TestWifiCapacityNatMode(object):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
print(profile_data)
|
||||
|
||||
create_station = CreateStation(_host = lf_test.lanforge_ip,
|
||||
'''create_station = CreateStation(_host = lf_test.lanforge_ip,
|
||||
_port = lf_test.lanforge_port,
|
||||
_ssid = profile_data["ssid_name"],
|
||||
_password = profile_data["security_key"],
|
||||
@@ -110,9 +109,9 @@ class TestWifiCapacityNatMode(object):
|
||||
_sta_list = ['1.1.sta0000','1.1.sta0001'],
|
||||
_radio = lf_test.twog_radios)
|
||||
create_station.build()
|
||||
time.sleep(20)
|
||||
PASS = lf_test.wifi_capacity(self, ssid = profile_data["ssid_name"], passkey = profile_data["security_key"],
|
||||
security = "wpa2", station_name = [], mode = "NAT", band = "twog",
|
||||
time.sleep(20)'''
|
||||
PASS = lf_test.wifi_capacity( ssid = profile_data["ssid_name"], paswd = profile_data["security_key"],
|
||||
security = "wpa2", mode = "NAT", band = "twog",
|
||||
instance_name = "wct_instance", )
|
||||
assert PASS
|
||||
|
||||
@@ -123,7 +122,7 @@ class TestWifiCapacityNatMode(object):
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
print(profile_data)
|
||||
|
||||
create_station = CreateStation(_host=lf_test.lanforge_ip,
|
||||
'''create_station = CreateStation(_host=lf_test.lanforge_ip,
|
||||
_port=lf_test.lanforge_port,
|
||||
_ssid=profile_data["ssid_name"],
|
||||
_password=profile_data["security_key"],
|
||||
@@ -131,9 +130,9 @@ class TestWifiCapacityNatMode(object):
|
||||
_sta_list=['1.1.sta0000', '1.1.sta0001'],
|
||||
_radio=lf_test.fiveg_radios)
|
||||
create_station.build()
|
||||
time.sleep(20)
|
||||
PASS = lf_test.wifi_capacity(self, ssid=profile_data["ssid_name"], passkey=profile_data["security_key"],
|
||||
security="wpa2", station_name=[], mode="NAT", band="fiveg",
|
||||
time.sleep(20)'''
|
||||
PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
|
||||
security="wpa2", mode="NAT", band="fiveg",
|
||||
instance_name="wct_instance", )
|
||||
assert PASS
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import pytest
|
||||
import sys
|
||||
import time
|
||||
import lf_wifi_capacity_test
|
||||
from lf_wifi_capacity_test import WiFiCapacityTest
|
||||
#import create_station
|
||||
#from create_station import CreateStation
|
||||
from create_station import CreateStation
|
||||
pytestmark = [pytest.mark.wifi_capacity_test, pytest.mark.vlan]
|
||||
|
||||
for folder in 'py-json', 'py-scripts':
|
||||
@@ -17,222 +15,125 @@ sys.path.append(f'../libs')
|
||||
sys.path.append(f'../libs/lanforge/')
|
||||
|
||||
from LANforge.LFUtils import *
|
||||
|
||||
'''if 'py-json' not in sys.path:
|
||||
sys.path.append('../py-scripts')'''
|
||||
from sta_connect2 import StaConnect2
|
||||
from eap_connect import EAPConnect
|
||||
import allure
|
||||
|
||||
# @pytest.mark.sanity
|
||||
@pytest.mark.wifi_capacity_test
|
||||
@pytest.mark.wifi5
|
||||
@pytest.mark.wifi6
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"open": [{"ssid_name": "ssid_open_2g", "appliedRadios": ["is2dot4GHz"]},
|
||||
{"ssid_name": "ssid_open_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
|
||||
"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
|
||||
}
|
||||
|
||||
|
||||
def lanforge_ip(args):
|
||||
pass
|
||||
|
||||
|
||||
@pytest.mark.basic
|
||||
@allure.feature("VLAN MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_profiles, create_profiles',
|
||||
[(["VLAN"], ["VLAN"])],
|
||||
'setup_profiles',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_profiles")
|
||||
@pytest.mark.usefixtures("create_profiles")
|
||||
class TestWifiCapacityVlanMode(object):
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.mutto
|
||||
@pytest.mark.twog
|
||||
def test_client_wpa_2g(self, request, get_lanforge_data, setup_profile_data, instantiate_testrail,
|
||||
instantiate_project, test_cases):
|
||||
print("")
|
||||
profile_data = setup_profile_data["Vlan"]["WPA"]["2G"]
|
||||
lanforge_ip = get_lanforge_data["lanforge_ip"]
|
||||
lanforge_port = int(get_lanforge_data["lanforge-port-number"])
|
||||
ssid = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
upstream = get_lanforge_data["lanforge_vlan_port"]
|
||||
radio = get_lanforge_data["lanforge_2dot4g"]
|
||||
station_name = get_lanforge_data["lanforge_2dot4g_station"]
|
||||
'''create_station = CreateStation(_host = lanforge_ip,
|
||||
_port = lanforge_port,
|
||||
_ssid = ssid,
|
||||
_password = security_key,
|
||||
_security = security,
|
||||
_sta_list = [station_name],
|
||||
_radio = radio)
|
||||
def test_client_wpa_2g(self, test_cases,lf_test):
|
||||
print("********** test_client_wpa_2g ***********")
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][0]
|
||||
print(profile_data)
|
||||
|
||||
'''create_station = CreateStation(_host = lf_test.lanforge_ip,
|
||||
_port = lf_test.lanforge_port,
|
||||
_ssid = profile_data["ssid_name"],
|
||||
_password = profile_data["security_key"],
|
||||
_security = "wpa",
|
||||
_sta_list = ['1.1.sta0000','1.1.sta0001'],
|
||||
_radio = lf_test.twog_radios)
|
||||
create_station.build()
|
||||
time.sleep(20)'''
|
||||
|
||||
PASS = False
|
||||
WFC_Test = WiFiCapacityTest(lf_host = lanforge_ip,
|
||||
lf_port = lanforge_port,
|
||||
lf_user = "lanforge",
|
||||
lf_password = "lanforge",
|
||||
instance_name = "wct_instance",
|
||||
config_name = "wifi_config",
|
||||
upstream = f"1.1.{upstream}",
|
||||
batch_size = "1",
|
||||
loop_iter = "1",
|
||||
protocol = "UDP-IPv4",
|
||||
duration = "3000",
|
||||
pull_report = True,
|
||||
load_old_cfg = False,
|
||||
upload_rate = "10Mbps",
|
||||
download_rate = "1Gbps",
|
||||
sort = "interleave",
|
||||
stations = "1.1.sta0000,1.1.sta0001",
|
||||
create_stations = True,
|
||||
radio = radio,
|
||||
security = security,
|
||||
paswd = security_key,
|
||||
ssid = ssid,
|
||||
enables = [],
|
||||
disables = [],
|
||||
raw_lines = [],
|
||||
raw_lines_file = "",
|
||||
sets = [],
|
||||
)
|
||||
WFC_Test.setup()
|
||||
WFC_Test.run()
|
||||
PASS = True
|
||||
#WFC_Test.check_influx_kpi(args)
|
||||
PASS = lf_test.wifi_capacity(ssid = profile_data["ssid_name"], paswd = profile_data["security_key"],
|
||||
security = "wpa", mode = "VLAN", band = "twog", instance_name = "wct_instance", )
|
||||
assert PASS
|
||||
|
||||
@pytest.mark.wpa
|
||||
@pytest.mark.fiveg
|
||||
def test_client_wpa_5g(self, get_lanforge_data, setup_profile_data):
|
||||
profile_data = setup_profile_data["VLAN"]["WPA"]["5G"]
|
||||
lanforge_ip = get_lanforge_data["lanforge_ip"]
|
||||
lanforge_port = int(get_lanforge_data["lanforge-port-number"])
|
||||
ssid = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
upstream = get_lanforge_data["lanforge_vlan_port"]
|
||||
radio = get_lanforge_data["lanforge_5g"]
|
||||
# Write Your test case Here
|
||||
PASS = False
|
||||
WFC_Test = WiFiCapacityTest(lf_host=lanforge_ip,
|
||||
lf_port=lanforge_port,
|
||||
lf_user="lanforge",
|
||||
lf_password="lanforge",
|
||||
instance_name="wct_instance",
|
||||
config_name="wifi_config",
|
||||
upstream=f"1.1.{upstream}",
|
||||
batch_size="1",
|
||||
loop_iter="1",
|
||||
protocol="UDP-IPv4",
|
||||
duration="3000",
|
||||
pull_report=True,
|
||||
load_old_cfg=False,
|
||||
upload_rate="10Mbps",
|
||||
download_rate="1Gbps",
|
||||
sort="interleave",
|
||||
stations="1.1.sta0000,1.1.sta0001",
|
||||
create_stations=True,
|
||||
radio=radio,
|
||||
security=security,
|
||||
paswd=security_key,
|
||||
ssid=ssid,
|
||||
enables=[],
|
||||
disables=[],
|
||||
raw_lines=[],
|
||||
raw_lines_file="",
|
||||
sets=[],
|
||||
)
|
||||
WFC_Test.setup()
|
||||
WFC_Test.run()
|
||||
PASS = True
|
||||
def test_client_wpa_5g(self, test_cases, lf_test):
|
||||
print("********** test_client_wpa_5g ***********")
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa"][1]
|
||||
print(profile_data)
|
||||
|
||||
'''create_station = CreateStation(_host=lf_test.lanforge_ip,
|
||||
_port=lf_test.lanforge_port,
|
||||
_ssid=profile_data["ssid_name"],
|
||||
_password=profile_data["security_key"],
|
||||
_security="wpa",
|
||||
_sta_list=['1.1.sta0000', '1.1.sta0001'],
|
||||
_radio=lf_test.fiveg_radios)
|
||||
create_station.build()
|
||||
time.sleep(20)'''
|
||||
PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
|
||||
security="wpa", mode="VLAN", band="fiveg",
|
||||
instance_name="wct_instance", )
|
||||
assert PASS
|
||||
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
def test_client_wpa2_personal_2g(self, get_lanforge_data, setup_profile_data):
|
||||
profile_data = setup_profile_data["VLAN"]["WPA2_P"]["2G"]
|
||||
lanforge_ip = get_lanforge_data["lanforge_ip"]
|
||||
lanforge_port = int(get_lanforge_data["lanforge-port-number"])
|
||||
ssid = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
upstream = get_lanforge_data["lanforge_vlan_port"]
|
||||
radio = get_lanforge_data["lanforge_2dot4g"]
|
||||
# Write Your test case Here
|
||||
PASS = False
|
||||
WFC_Test = WiFiCapacityTest(lf_host=lanforge_ip,
|
||||
lf_port=lanforge_port,
|
||||
lf_user="lanforge",
|
||||
lf_password="lanforge",
|
||||
instance_name="wct_instance",
|
||||
config_name="wifi_config",
|
||||
upstream=f"1.1.{upstream}",
|
||||
batch_size="1",
|
||||
loop_iter="1",
|
||||
protocol="UDP-IPv4",
|
||||
duration="3000",
|
||||
pull_report=True,
|
||||
load_old_cfg=False,
|
||||
upload_rate="10Mbps",
|
||||
download_rate="1Gbps",
|
||||
sort="interleave",
|
||||
stations="1.1.sta0000,1.1.sta0001",
|
||||
create_stations=True,
|
||||
radio=radio,
|
||||
security=security,
|
||||
paswd=security_key,
|
||||
ssid=ssid,
|
||||
enables=[],
|
||||
disables=[],
|
||||
raw_lines=[],
|
||||
raw_lines_file="",
|
||||
sets=[],
|
||||
)
|
||||
WFC_Test.setup()
|
||||
WFC_Test.run()
|
||||
PASS = True
|
||||
def test_client_wpa2_personal_2g(self, test_cases,lf_test):
|
||||
print("********** test_client_wpa2_personal_2g ***********")
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
print(profile_data)
|
||||
|
||||
'''create_station = CreateStation(_host = lf_test.lanforge_ip,
|
||||
_port = lf_test.lanforge_port,
|
||||
_ssid = profile_data["ssid_name"],
|
||||
_password = profile_data["security_key"],
|
||||
_security = "wpa2",
|
||||
_sta_list = ['1.1.sta0000','1.1.sta0001'],
|
||||
_radio = lf_test.twog_radios)
|
||||
create_station.build()
|
||||
time.sleep(20)'''
|
||||
PASS = lf_test.wifi_capacity( ssid = profile_data["ssid_name"], paswd = profile_data["security_key"],
|
||||
security = "wpa2", mode = "VLAN", band = "twog",
|
||||
instance_name = "wct_instance", )
|
||||
assert PASS
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_client_wpa2_personal_5g(self, get_lanforge_data, setup_profile_data):
|
||||
profile_data = setup_profile_data["VLAN"]["WPA2_P"]["5G"]
|
||||
lanforge_ip = get_lanforge_data["lanforge_ip"]
|
||||
lanforge_port = int(get_lanforge_data["lanforge-port-number"])
|
||||
ssid = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
upstream = get_lanforge_data["lanforge_vlan_port"]
|
||||
radio = get_lanforge_data["lanforge_5g"]
|
||||
def test_client_wpa2_personal_5g(self, test_cases, lf_test):
|
||||
print("********** test_client_wpa2_personal_5g ***********")
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
print(profile_data)
|
||||
|
||||
# Write Your test case Here
|
||||
PASS = False
|
||||
WFC_Test = WiFiCapacityTest(lf_host=lanforge_ip,
|
||||
lf_port=lanforge_port,
|
||||
lf_user="lanforge",
|
||||
lf_password="lanforge",
|
||||
instance_name="wct_instance",
|
||||
config_name="wifi_config",
|
||||
upstream=f"1.1.{upstream}",
|
||||
batch_size="1",
|
||||
loop_iter="1",
|
||||
protocol="UDP-IPv4",
|
||||
duration="3000",
|
||||
pull_report=True,
|
||||
load_old_cfg=False,
|
||||
upload_rate="10Mbps",
|
||||
download_rate="1Gbps",
|
||||
sort="interleave",
|
||||
stations="1.1.sta0000,1.1.sta0001",
|
||||
create_stations=True,
|
||||
radio=radio,
|
||||
security=security,
|
||||
paswd=security_key,
|
||||
ssid=ssid,
|
||||
enables=[],
|
||||
disables=[],
|
||||
raw_lines=[],
|
||||
raw_lines_file="",
|
||||
sets=[],
|
||||
)
|
||||
WFC_Test.setup()
|
||||
WFC_Test.run()
|
||||
PASS = True
|
||||
'''create_station = CreateStation(_host=lf_test.lanforge_ip,
|
||||
_port=lf_test.lanforge_port,
|
||||
_ssid=profile_data["ssid_name"],
|
||||
_password=profile_data["security_key"],
|
||||
_security="wpa2",
|
||||
_sta_list=['1.1.sta0000', '1.1.sta0001'],
|
||||
_radio=lf_test.fiveg_radios)
|
||||
create_station.build()
|
||||
time.sleep(20)'''
|
||||
PASS = lf_test.wifi_capacity(ssid=profile_data["ssid_name"], paswd=profile_data["security_key"],
|
||||
security="wpa2", mode="VLAN", band="fiveg",
|
||||
instance_name="wct_instance", )
|
||||
assert PASS
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user