mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-01 19:37:54 +00:00
Merge-refactored advanced testplans (#756)
This commit is contained in:
8
.github/workflows/manual.yml
vendored
8
.github/workflows/manual.yml
vendored
@@ -125,6 +125,14 @@ jobs:
|
||||
echo "In order to get logs, open the link above and press 'View logs' button in top right corner"
|
||||
echo "If you want to get logs auto-updated, choose this option in dropdown menu hidden behind three dots in top right corner of logs viewer"
|
||||
|
||||
- name: tests env info
|
||||
run: |
|
||||
export NAMESPACE=manual-${{ github.run_id }}-${{ github.event.inputs.testbed }}
|
||||
echo "Namespace name - $NAMESPACE"
|
||||
echo "Link to related job in Kubernetes dashboard - https://k8s-dashboard.lab.wlan.tip.build/#/job/$NAMESPACE/testing?namespace=$NAMESPACE"
|
||||
echo "In order to get logs, open the link above and press 'View logs' button in top right corner"
|
||||
echo "If you want to get logs auto-updated, choose this option in dropdown menu hidden behind three dots in top right corner of logs viewer"
|
||||
|
||||
- name: run tests
|
||||
uses: ./.github/actions/run-tests
|
||||
with:
|
||||
|
||||
@@ -191,6 +191,11 @@ wpa3_enterprise_mixed: Use this marker to run wpa3_enterprise_mixed Encryption t
|
||||
npm install -g allure-commandline --save-dev
|
||||
```
|
||||
### [Test Plans and Markers](TEST_PLANS.md):bookmark_tabs:
|
||||
|
||||
# Docker Setup Instructions
|
||||
|
||||
This repository support building Docker image from bundled [Dockerfile](./docker/Dockerfile). If you want to use it for testing, please refer to the [related directory for details](./docker).
|
||||
|
||||
### Executing and Contributing new test cases
|
||||
|
||||
Follow instructions provided [here](./tests/README.md) to understand the Testing Framework, and How to run and
|
||||
|
||||
79
libs/SetupLibrary.py
Normal file
79
libs/SetupLibrary.py
Normal file
@@ -0,0 +1,79 @@
|
||||
import logging
|
||||
|
||||
import paramiko
|
||||
from scp import SCPClient
|
||||
|
||||
logging.basicConfig(format='%(asctime)s - %(message)s', level=logging.INFO)
|
||||
|
||||
|
||||
class SetupLibrary:
|
||||
|
||||
def __init__(self, remote_ip="",
|
||||
remote_ssh_port=22,
|
||||
remote_ssh_username="lanforge",
|
||||
remote_ssh_password="lanforge",
|
||||
pwd="",
|
||||
):
|
||||
self.pwd = pwd
|
||||
self.remote_ip = remote_ip
|
||||
self.remote_ssh_username = remote_ssh_username
|
||||
self.remote_ssh_password = remote_ssh_password
|
||||
self.remote_ssh_port = remote_ssh_port
|
||||
|
||||
def setup_serial_environment(self):
|
||||
client = self.ssh_cli_connect()
|
||||
cmd = '[ -f ~/cicd-git/ ] && echo "True" || echo "False"'
|
||||
stdin, stdout, stderr = client.exec_command(cmd)
|
||||
output = str(stdout.read())
|
||||
if output.__contains__("False"):
|
||||
cmd = 'mkdir ~/cicd-git/'
|
||||
client.exec_command(cmd)
|
||||
cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"'
|
||||
stdin, stdout, stderr = client.exec_command(cmd)
|
||||
output = str(stdout.read())
|
||||
if output.__contains__("False"):
|
||||
print("Copying openwrt_ctl serial control Script...")
|
||||
with SCPClient(client.get_transport()) as scp:
|
||||
scp.put(self.pwd + 'openwrt_ctl.py', '~/cicd-git/openwrt_ctl.py') # Copy my_file.txt to the server
|
||||
cmd = '[ -f ~/cicd-git/openwrt_ctl.py ] && echo "True" || echo "False"'
|
||||
stdin, stdout, stderr = client.exec_command(cmd)
|
||||
var = str(stdout.read())
|
||||
client.close()
|
||||
|
||||
def ssh_cli_connect(self):
|
||||
client = paramiko.SSHClient()
|
||||
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
logging.info("Trying SSH Connection to: " + str(self.remote_ip) +
|
||||
" on port: " + str(self.remote_ssh_port) +
|
||||
" with username: " + str(self.remote_ssh_username) +
|
||||
" and password: " + str(self.remote_ssh_password))
|
||||
client.connect(self.remote_ip, username=self.remote_ssh_username, password=self.remote_ssh_password,
|
||||
port=self.remote_ssh_port, timeout=10, allow_agent=False, banner_timeout=200)
|
||||
return client
|
||||
|
||||
def check_serial_connection(self, tty="/dev/ttyUSB0"):
|
||||
client = self.ssh_cli_connect()
|
||||
cmd = 'ls /dev/tty*'
|
||||
stdin, stdout, stderr = client.exec_command(cmd)
|
||||
output = str(stdout.read().decode('utf-8'))
|
||||
client.close()
|
||||
available_tty_ports = output.split("\n")
|
||||
if tty in available_tty_ports:
|
||||
logging.info("Expected Serial Console Port is available on Remote system: " + tty)
|
||||
return tty in available_tty_ports
|
||||
|
||||
def kill_all_minicom_process(self, tty="/dev/ttyUSB0"):
|
||||
client = self.ssh_cli_connect()
|
||||
stdin, stdout, stderr = client.exec_command("fuser -k " + tty)
|
||||
print(stdout.read())
|
||||
client.close()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
obj = SetupLibrary(remote_ip="192.168.52.89",
|
||||
remote_ssh_port=22,
|
||||
pwd="")
|
||||
|
||||
obj.setup_serial_environment()
|
||||
obj.check_serial_connection(tty="/dev/ttyUSB0")
|
||||
obj.kill_all_minicom_process(tty="/dev/ttyUSB0")
|
||||
385
libs/openwrt_ctl.py
Executable file
385
libs/openwrt_ctl.py
Executable file
@@ -0,0 +1,385 @@
|
||||
#!/usr/bin/python3
|
||||
'''
|
||||
|
||||
make sure pexpect is installed:
|
||||
$ sudo yum install python3-pexpect
|
||||
|
||||
You might need to install pexpect-serial using pip:
|
||||
$ pip3 install serial
|
||||
$ pip3 install pexpect-serial
|
||||
|
||||
./openwrt_ctl.py -l stdout -u root -p TIP -s serial --tty ttyUSB0
|
||||
|
||||
# Set up reverse ssh tunnel
|
||||
./openwrt_ctl.py --tty /dev/ttyAP1 --action ssh-tunnel \
|
||||
--value "ssh -y -y -f -N -T -M -R 9999:localhost:22 lanforge@10.28.3.100" \
|
||||
--value2 password-for-10.28.3.100 --log stdout --scheme serial --prompt root@Open
|
||||
'''
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
|
||||
if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit()
|
||||
|
||||
try:
|
||||
import importlib
|
||||
re = importlib.import_module("re")
|
||||
logging = importlib.import_module("logging")
|
||||
time = importlib.import_module("time")
|
||||
sleep = time.sleep
|
||||
pexpect = importlib.import_module("pexpect")
|
||||
serial = importlib.import_module("serial")
|
||||
pexpect_serial = importlib.import_module("pexpect_serial")
|
||||
SerialSpawn = pexpect_serial.SerialSpawn
|
||||
pprint = importlib.import_module("pprint")
|
||||
telnetlib = importlib.import_module("telnetlib")
|
||||
argparse = importlib.import_module("argparse")
|
||||
except ImportError as e:
|
||||
print(e)
|
||||
sys.exit("Python Import Error: " + str(e))
|
||||
|
||||
default_host = "localhost"
|
||||
default_ports = {
|
||||
"serial": None,
|
||||
"ssh": 22,
|
||||
"telnet": 23
|
||||
}
|
||||
NL = "\n"
|
||||
CR = "\r\n"
|
||||
Q = '"'
|
||||
A = "'"
|
||||
FORMAT = '%(asctime)s %(name)s %(levelname)s: %(message)s'
|
||||
prompt = "root@OpenWrt:"
|
||||
|
||||
|
||||
def usage():
|
||||
print("$0 used connect to OpenWrt AP or similar Linux machine:")
|
||||
print("-d|--dest IP address of the OpenWrt AP, for ssh/telnet scheme")
|
||||
print("-o|--port IP port of the OpenWrt AP, for ssh/telnet scheme")
|
||||
print("-t|--tty Serial port, if using serial scheme")
|
||||
print("-u|--user login name")
|
||||
print("-p|--pass password")
|
||||
print("--prompt Prompt to look for when commands are done (default: root@OpenWrt)")
|
||||
print("-s|--scheme (serial|telnet|ssh): connect via serial, ssh or telnet")
|
||||
print("-l|--log file log messages here")
|
||||
print("--action (logread | journalctl | lurk | sysupgrade | download | upload | reboot | cmd | ssh-tunnel")
|
||||
print("--value (option to help complete the action")
|
||||
print("--value2 (option to help complete the action, dest filename for download, passwd for ssh-tunnel")
|
||||
print("-h|--help")
|
||||
|
||||
|
||||
# see https://stackoverflow.com/a/13306095/11014343
|
||||
class FileAdapter(object):
|
||||
def __init__(self, logger):
|
||||
self.logger = logger
|
||||
|
||||
def write(self, data):
|
||||
# NOTE: data can be a partial line, multiple lines
|
||||
data = data.strip() # ignore leading/trailing whitespace
|
||||
if data: # non-blank
|
||||
self.logger.info(data)
|
||||
|
||||
def flush(self):
|
||||
pass # leave it to logging to flush properly
|
||||
|
||||
|
||||
def main():
|
||||
global prompt
|
||||
|
||||
parser = argparse.ArgumentParser(description="OpenWrt AP Control Script")
|
||||
parser.add_argument("-d", "--dest", type=str, help="address of the cisco controller_tests")
|
||||
parser.add_argument("-o", "--port", type=int, help="control port on the controller_tests")
|
||||
parser.add_argument("-u", "--user", type=str, help="credential login/username")
|
||||
parser.add_argument("-p", "--passwd", type=str, help="credential password")
|
||||
parser.add_argument("-P", "--prompt", type=str, help="Prompt to look for")
|
||||
parser.add_argument("-s", "--scheme", type=str, choices=["serial", "ssh", "telnet"],
|
||||
help="Connect via serial, ssh or telnet")
|
||||
parser.add_argument("-t", "--tty", type=str, help="tty serial device")
|
||||
parser.add_argument("-l", "--log", type=str, help="logfile for messages, stdout means output to console")
|
||||
parser.add_argument("--action", type=str, help="perform action",
|
||||
choices=["logread", "journalctl", "lurk", "sysupgrade", "sysupgrade-n", "download", "upload",
|
||||
"reboot", "cmd", "ssh-tunnel"])
|
||||
parser.add_argument("--value", type=str, help="set value")
|
||||
parser.add_argument("--value2", type=str, help="set value2")
|
||||
tty = None
|
||||
|
||||
args = None
|
||||
try:
|
||||
args = parser.parse_args()
|
||||
host = args.dest
|
||||
scheme = args.scheme
|
||||
port = args.port
|
||||
# port = (default_ports[scheme], args.port)[args.port != None]
|
||||
user = args.user
|
||||
passwd = args.passwd
|
||||
logfile = args.log
|
||||
tty = args.tty;
|
||||
if (args.prompt != None):
|
||||
prompt = args.prompt
|
||||
filehandler = None
|
||||
except Exception as e:
|
||||
logging.exception(e);
|
||||
usage()
|
||||
exit(2);
|
||||
|
||||
console_handler = logging.StreamHandler()
|
||||
formatter = logging.Formatter(FORMAT)
|
||||
logg = logging.getLogger(__name__)
|
||||
logg.setLevel(logging.DEBUG)
|
||||
file_handler = None
|
||||
if (logfile is not None):
|
||||
if (logfile != "stdout"):
|
||||
file_handler = logging.FileHandler(logfile, "w")
|
||||
file_handler.setLevel(logging.DEBUG)
|
||||
file_handler.setFormatter(formatter)
|
||||
logg.addHandler(file_handler)
|
||||
logging.basicConfig(format=FORMAT, handlers=[file_handler])
|
||||
else:
|
||||
# stdout logging
|
||||
logging.basicConfig(format=FORMAT, handlers=[console_handler])
|
||||
|
||||
CCPROMPT = prompt
|
||||
|
||||
ser = None
|
||||
egg = None # think "eggpect"
|
||||
try:
|
||||
if (scheme == "serial"):
|
||||
# eggspect = pexpect.fdpexpect.fdspan(telcon, logfile=sys.stdout.buffer)
|
||||
|
||||
ser = serial.Serial(tty, 115200, timeout=5)
|
||||
|
||||
egg = SerialSpawn(ser);
|
||||
egg.logfile = FileAdapter(logg)
|
||||
egg.sendline(NL)
|
||||
has_reset = False
|
||||
try:
|
||||
logg.info("prompt: %s user: %s passwd: %s" % (prompt, user, passwd))
|
||||
while True:
|
||||
i = egg.expect([prompt, "Please press Enter to activate", "login:", "Password:", "IPQ6018#"],
|
||||
timeout=3)
|
||||
logg.info("expect-0: %i" % (i))
|
||||
if (i == 0):
|
||||
logg.info("Found prompt, login complete.")
|
||||
break
|
||||
if (i == 1):
|
||||
logg.info("Sending newline")
|
||||
egg.setdline(NL)
|
||||
if (i == 2):
|
||||
logg.info("Sending username: %s" % (user))
|
||||
egg.sendline(user)
|
||||
if (i == 3):
|
||||
logg.info("Sending password: %s" % (passwd))
|
||||
egg.sendline(passwd)
|
||||
if (i == 4): # in bootloader
|
||||
if has_reset:
|
||||
logg.info("ERROR: Have reset once already, back in bootloader?")
|
||||
sys.exit(1)
|
||||
has_reset = True
|
||||
logg.info("In boot loader, will reset and sleep 30 seconds")
|
||||
egg.sendline("reset")
|
||||
time.sleep(30)
|
||||
egg.sendline(NL)
|
||||
|
||||
except Exception as e:
|
||||
# maybe something like 'logread -f' is running?
|
||||
# send ctrl-c
|
||||
egg.send(chr(3))
|
||||
|
||||
elif (scheme == "ssh"):
|
||||
# Not implemented/tested currently. --Ben
|
||||
if (port is None):
|
||||
port = 22
|
||||
cmd = "ssh -p%d %s@%s" % (port, user, host)
|
||||
logg.info("Spawn: " + cmd + NL)
|
||||
egg = pexpect.spawn(cmd)
|
||||
# egg.logfile_read = sys.stdout.buffer
|
||||
egg.logfile = FileAdapter(logg)
|
||||
i = egg.expect(["password:", "continue connecting (yes/no)?"], timeout=3)
|
||||
time.sleep(0.1)
|
||||
if i == 1:
|
||||
egg.sendline('yes')
|
||||
egg.expect('password:')
|
||||
sleep(0.1)
|
||||
egg.sendline(passwd)
|
||||
|
||||
elif (scheme == "telnet"):
|
||||
# Not implemented/tested currently. --Ben
|
||||
if (port is None):
|
||||
port = 23
|
||||
cmd = "telnet %s %d" % (host, port)
|
||||
logg.info("Spawn: " + cmd + NL)
|
||||
egg = pexpect.spawn(cmd)
|
||||
egg.logfile = FileAdapter(logg)
|
||||
time.sleep(0.1)
|
||||
egg.sendline(' ')
|
||||
egg.expect('User\:')
|
||||
egg.sendline(user)
|
||||
egg.expect('Password\:')
|
||||
egg.sendline(passwd)
|
||||
egg.sendline('config paging disable')
|
||||
else:
|
||||
usage()
|
||||
exit(1)
|
||||
except Exception as e:
|
||||
logging.exception(e);
|
||||
|
||||
command = None
|
||||
|
||||
CLOSEDBYREMOTE = "closed by remote host."
|
||||
CLOSEDCX = "Connection to .* closed."
|
||||
|
||||
try:
|
||||
egg.expect(CCPROMPT)
|
||||
except Exception as e:
|
||||
egg.sendline(NL)
|
||||
|
||||
TO = 10
|
||||
wait_forever = False
|
||||
|
||||
# Clean pending output
|
||||
egg.sendline("echo __hello__")
|
||||
egg.expect("__hello__")
|
||||
egg.expect(CCPROMPT)
|
||||
|
||||
logg.info("Action[%s] Value[%s] Value2[%s]" % (args.action, args.value, args.value2))
|
||||
|
||||
if (args.action == "reboot"):
|
||||
command = "reboot"
|
||||
TO = 60
|
||||
|
||||
if (args.action == "cmd"):
|
||||
if (args.value is None):
|
||||
raise Exception("cmd requires value to be set.")
|
||||
command = "%s" % (args.value)
|
||||
|
||||
if (args.action == "logread"):
|
||||
command = "logread -f"
|
||||
TO = 1
|
||||
wait_forever = True
|
||||
|
||||
if (args.action == "journalctl"):
|
||||
command = "journalctl -f"
|
||||
TO = 1
|
||||
wait_forever = True
|
||||
|
||||
if (args.action == "lurk"):
|
||||
command = "date"
|
||||
TO = 1
|
||||
wait_forever = True
|
||||
|
||||
if (args.action == "ssh-tunnel"):
|
||||
command = "%s" % (args.value)
|
||||
passwd = "%s" % (args.value2)
|
||||
logg.info("Command[%s]" % command)
|
||||
egg.sendline(command);
|
||||
|
||||
i = egg.expect(["password:", "Do you want to continue connecting"], timeout=5)
|
||||
if i == 1:
|
||||
egg.sendline("y")
|
||||
egg.expect("password:", timeout=5)
|
||||
egg.sendline(passwd)
|
||||
egg.expect(CCPROMPT, timeout=20)
|
||||
return
|
||||
|
||||
if ((args.action == "sysupgrade") or (args.action == "sysupgrade-n")):
|
||||
command = "scp %s /tmp/new_img.bin" % (args.value)
|
||||
logg.info("Command[%s]" % command)
|
||||
egg.sendline(command);
|
||||
|
||||
i = egg.expect(["password:", "Do you want to continue connecting"], timeout=5)
|
||||
if i == 1:
|
||||
egg.sendline("y")
|
||||
egg.expect("password:", timeout=5)
|
||||
egg.sendline("lanforge")
|
||||
egg.expect(CCPROMPT, timeout=20)
|
||||
if (args.action == "sysupgrade-n"):
|
||||
egg.sendline("sysupgrade -n /tmp/new_img.bin")
|
||||
else:
|
||||
egg.sendline("sysupgrade /tmp/new_img.bin")
|
||||
egg.expect("link becomes ready", timeout=100)
|
||||
return
|
||||
|
||||
if (args.action == "download"):
|
||||
command = "scp %s /tmp/%s" % (args.value, args.value2)
|
||||
logg.info("Command[%s]" % command)
|
||||
egg.sendline(command);
|
||||
|
||||
i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5)
|
||||
if i == 2:
|
||||
print("Network unreachable, wait 15 seconds and try again.")
|
||||
time.sleep(15)
|
||||
command = "scp %s /tmp/%s" % (args.value, args.value2)
|
||||
logg.info("Command[%s]" % command)
|
||||
egg.sendline(command);
|
||||
|
||||
i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5)
|
||||
if i == 2:
|
||||
print("ERROR: Could not connect to LANforge to get download file")
|
||||
exit(2)
|
||||
if i == 1:
|
||||
egg.sendline("y")
|
||||
egg.expect("password:", timeout=5)
|
||||
egg.sendline("lanforge")
|
||||
egg.expect(CCPROMPT, timeout=20)
|
||||
return
|
||||
|
||||
if (args.action == "upload"):
|
||||
command = "scp %s %s" % (args.value, args.value2)
|
||||
logg.info("Command[%s]" % command)
|
||||
egg.sendline(command);
|
||||
|
||||
i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5)
|
||||
if i == 2:
|
||||
print("Network unreachable, wait 15 seconds and try again.")
|
||||
time.sleep(15)
|
||||
command = "scp /tmp/%s %s" % (args.value, args.value2)
|
||||
logg.info("Command[%s]" % command)
|
||||
egg.sendline(command);
|
||||
|
||||
i = egg.expect(["password:", "Do you want to continue connecting", "Network unreachable"], timeout=5)
|
||||
if i == 2:
|
||||
print("ERROR: Could not connect to LANforge to put upload file")
|
||||
exit(2)
|
||||
if i == 1:
|
||||
egg.sendline("y")
|
||||
egg.expect("password:", timeout=5)
|
||||
egg.sendline("lanforge")
|
||||
egg.expect(CCPROMPT, timeout=20)
|
||||
return
|
||||
|
||||
if (command is None):
|
||||
logg.info("No command specified, going to log out.")
|
||||
else:
|
||||
logg.info("Command[%s]" % command)
|
||||
egg.sendline(command);
|
||||
while True:
|
||||
try:
|
||||
i = egg.expect([CCPROMPT, "kmodloader: done loading kernel", "\n"], timeout=TO)
|
||||
print(egg.before.decode('utf-8', 'ignore'))
|
||||
if i == 1:
|
||||
egg.sendline(' ')
|
||||
egg.expect(CCPROMPT, timeout=20)
|
||||
print(egg.before.decode('utf-8', 'ignore'))
|
||||
if i == 2: # new line of text, just print and continue
|
||||
continue
|
||||
|
||||
if not wait_forever:
|
||||
break
|
||||
|
||||
except Exception as e:
|
||||
# Some commands take a long time (logread -f)
|
||||
if not wait_forever:
|
||||
logging.exception(e)
|
||||
break
|
||||
|
||||
|
||||
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
####
|
||||
####
|
||||
####
|
||||
@@ -1146,6 +1146,852 @@ class ios_libs:
|
||||
print("get_wifi_switch_element is ON")
|
||||
# --------------------To Turn on WIFi Switch if already OFF--------------------------------
|
||||
|
||||
# Runs Speed test on OOKla Speed test App on Android devices, OOKLA app should be present on the Device
|
||||
def speed_test(self, setup_perfectoMobile):
|
||||
driver = setup_perfectoMobile[0]
|
||||
driver.switch_to.context('NATIVE_APP')
|
||||
self.openApp('com.ookla.speedtest', setup_perfectoMobile)
|
||||
driver.find_element_by_xpath("//*[@label='GO']").click()
|
||||
# Wait untill 2 minutes for the test to complete
|
||||
WebDriverWait(driver, 120).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@value='Test Again']")))
|
||||
result = driver.find_element_by_xpath("//XCUIElementTypeOther[contains(@label,'Download Speed')]").text
|
||||
print(result)
|
||||
download_speed = result.split('Download Speed, ')[1].split('. ')[0]
|
||||
upload_speed = result.split('Upload speed, ')[1].split('. ')[0]
|
||||
download_speed = str(download_speed)[0:4]
|
||||
upload_speed = str(upload_speed)[0:4]
|
||||
print(f"Download speed: {download_speed}")
|
||||
print(f"Upload speed: {upload_speed}")
|
||||
return download_speed, upload_speed
|
||||
|
||||
# Function used to connect to a particular SSID
|
||||
def wifi_connect(self, ssid, passkey, setup_perfectoMobile, connData):
|
||||
print("\n-------------------------------------")
|
||||
print("Select Wifi/Get IP Address IOS Connection")
|
||||
print("-------------------------------------")
|
||||
is_internet = False
|
||||
wifi_name = ssid
|
||||
wifi_pass = passkey
|
||||
ssid_found = False
|
||||
print("Verifying Wifi/AP Connection Details....")
|
||||
report = setup_perfectoMobile[1]
|
||||
driver = setup_perfectoMobile[0]
|
||||
|
||||
report.step_start("Switching Driver Context")
|
||||
print("Switching Context to Native")
|
||||
driver.switch_to.context('NATIVE_APP')
|
||||
# driver.switch_to.context(contexts[0])
|
||||
|
||||
report.step_start("Set Wifi Network to " + wifi_name)
|
||||
# Open Settings Application
|
||||
logging.info("Opening IOS setting APP")
|
||||
self.openApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
|
||||
try:
|
||||
time.sleep(2)
|
||||
driver.implicitly_wait(2)
|
||||
try:
|
||||
print("Verifying Connected Wifi Connection")
|
||||
report.step_start("Loading Wifi Page")
|
||||
element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']")
|
||||
element.click()
|
||||
except NoSuchElementException:
|
||||
print("Exception: Verify Xpath - unable to click on Wifi")
|
||||
logging.error("Exception: Verify Xpath - unable to click on Wifi")
|
||||
|
||||
time.sleep(2)
|
||||
driver.implicitly_wait(4)
|
||||
# --------------------To Turn on WIFi Switch if already OFF--------------------------------
|
||||
try:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']")
|
||||
get_wifi_switch_element_text = get_wifi_switch_element.text
|
||||
try:
|
||||
if get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']")
|
||||
driver.implicitly_wait(1)
|
||||
get_wifi_switch_element.click()
|
||||
driver.implicitly_wait(1)
|
||||
i = 0
|
||||
for i in range(5):
|
||||
try:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath(
|
||||
"//*[@label='Wi-Fi' and @value='1']")
|
||||
get_wifi_switch_element_text = get_wifi_switch_element.text
|
||||
except:
|
||||
print("Switch is OFF")
|
||||
logging.info("Wifi Switch is OFF")
|
||||
|
||||
if get_wifi_switch_element_text == "1" or get_wifi_switch_element_text == 1:
|
||||
print("WIFI Switch is ON")
|
||||
logging.info("Wifi Switch is ON")
|
||||
break
|
||||
else:
|
||||
try:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath(
|
||||
"//*[@label='Wi-Fi' and @value='0']")
|
||||
get_wifi_switch_element_text = get_wifi_switch_element.text
|
||||
except:
|
||||
print("WIFi switch is ON")
|
||||
logging.info("Wifi Switch is ON")
|
||||
if (get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0):
|
||||
print("switch is still OFF")
|
||||
logging.error("Wifi Switch is OFF")
|
||||
self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
else:
|
||||
print("Switch is Still OFF")
|
||||
logging.error("Wifi Switch is OFF")
|
||||
self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
except:
|
||||
print("No switch element found")
|
||||
logging.error("No switch element found")
|
||||
except:
|
||||
print("get_wifi_switch_element is ON")
|
||||
logging.warning("get_wifi_switch_element is ON")
|
||||
# --------------------To Turn on WIFi Switch if already OFF--------------------------------
|
||||
|
||||
except:
|
||||
print("Cannot find WIFI element")
|
||||
logging.error("Cannot find WIFI element")
|
||||
self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
|
||||
# ---------------------This is to Forget current connected SSID-------------------------------
|
||||
# ---------------------This to Avoid any popup page from captive portal--------------------#
|
||||
|
||||
try:
|
||||
time.sleep(4)
|
||||
print("getting in to Additional details")
|
||||
report.step_start("Clicking More Info")
|
||||
logging.info("getting in to Additional details")
|
||||
additional_details_element = driver.find_element_by_xpath(
|
||||
"//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']")
|
||||
additional_details_element.click()
|
||||
try:
|
||||
time.sleep(2)
|
||||
print("Forget Connected Network")
|
||||
logging.info("Forget Connected Network")
|
||||
forget_ssid = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']")))
|
||||
forget_ssid.click()
|
||||
print("Forget old ssid")
|
||||
logging.info("Forget old ssid")
|
||||
try:
|
||||
time.sleep(2)
|
||||
report.step_start("Forget SSID popup1")
|
||||
forget_ssid_popup = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']")))
|
||||
forget_ssid_popup.click()
|
||||
|
||||
print("**alert** Forget SSID popup killed **alert**")
|
||||
except:
|
||||
print("Forget SSID popup not found")
|
||||
except:
|
||||
print("couldn't find forget ssid element")
|
||||
logging.warning("couldn't find forget ssid element")
|
||||
except:
|
||||
print("No connected SSID")
|
||||
logging.info("No connected SSID")
|
||||
try:
|
||||
report.step_start("Unexpected Captive Popup")
|
||||
print("Unexpeceted Captive Poped Up")
|
||||
captive_portal_cancel_element = driver.find_element_by_xpath("//*[@label='Cancel']")
|
||||
captive_portal_cancel_element.click()
|
||||
time.sleep(2)
|
||||
use_other_network_element = driver.find_element_by_xpath("//*[@label='Use Other Network']")
|
||||
use_other_network_element.click()
|
||||
time.sleep(2)
|
||||
except:
|
||||
print("No Captive Portal Popup Found")
|
||||
try:
|
||||
time.sleep(4)
|
||||
print("getting in to Additional details")
|
||||
report.step_start("Clicking More Info")
|
||||
additional_details_element = driver.find_element_by_xpath(
|
||||
"//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']")
|
||||
additional_details_element.click()
|
||||
try:
|
||||
time.sleep(2)
|
||||
print("Forget Connected Network")
|
||||
forget_ssid = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']")))
|
||||
forget_ssid.click()
|
||||
print("Forget old ssid")
|
||||
try:
|
||||
time.sleep(2)
|
||||
report.step_start("Forget SSID popup1")
|
||||
forget_ssid_popup = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']")))
|
||||
forget_ssid_popup.click()
|
||||
|
||||
print("**alert** Forget SSID popup killed **alert**")
|
||||
except:
|
||||
print("Forget SSID popup not found")
|
||||
except:
|
||||
print("couldn't find forget ssid element")
|
||||
except:
|
||||
print("No connected SSID")
|
||||
|
||||
# ---------------------This is to Forget current connected SSID-------------------------------
|
||||
|
||||
# ---------------------To get all available SSID and select it-------------------------------
|
||||
print("Searching for Wifi: " + wifi_name)
|
||||
# allure.attach(name= body=str("Searching for Wifi: " + wifi_name))
|
||||
time.sleep(2)
|
||||
report.step_start("Searching SSID")
|
||||
print("Selecting Wifi: " + wifi_name)
|
||||
available_ssids = False
|
||||
|
||||
try:
|
||||
for check_for_all_ssids in range(12):
|
||||
available_ssids = self.get_all_available_ssids(driver)
|
||||
allure.attach(name="Available SSIDs in device: ", body=str(available_ssids))
|
||||
try:
|
||||
if (not self.ssid_Visible(driver, wifi_name)) or (wifi_name not in available_ssids):
|
||||
self.scrollDown(setup_perfectoMobile)
|
||||
time.sleep(2)
|
||||
else:
|
||||
try:
|
||||
driver.implicitly_wait(8)
|
||||
report.step_start("Selecting SSID To Connect")
|
||||
ssid_found = True
|
||||
print(wifi_name + " : Found in Device")
|
||||
wifiSelElement = WebDriverWait(driver, 35).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='" + wifi_name + "']")))
|
||||
print(wifiSelElement)
|
||||
wifiSelElement.click()
|
||||
print("Selecting SSID")
|
||||
break
|
||||
except:
|
||||
print("SSID unable to select")
|
||||
logging.error("Unable to select SSID")
|
||||
report.step_start("Selecting Unable SSID To Connect")
|
||||
self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
|
||||
except:
|
||||
print("couldn't connect to " + wifi_name)
|
||||
logging.error("Couldn't Find ssid")
|
||||
# request.config.cache.set(key="SelectingWifiFailed", value=str(e))
|
||||
self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
pass
|
||||
|
||||
if not ssid_found:
|
||||
print("could not found " + wifi_name + " in device")
|
||||
logging.error("Couldn't Find ssid in device")
|
||||
self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
except:
|
||||
pass
|
||||
# ---------------------To get all available SSID and select it-------------------------------
|
||||
# ---------------------Set Password-------------------------------
|
||||
try:
|
||||
driver.implicitly_wait(5)
|
||||
print("Entering Password")
|
||||
logging.info("Entering Password")
|
||||
report.step_start("Entering Password")
|
||||
wifiPassword = driver.find_element_by_xpath("//*[@label='Password']")
|
||||
wifiPassword.send_keys(wifi_pass)
|
||||
except NoSuchElementException:
|
||||
print("Enter Password Page Not Loaded")
|
||||
logging.warning("Enter Password Page Not Loaded")
|
||||
# ---------------------Set Password-------------------------------
|
||||
|
||||
# ---------------------Click on join-------------------------------
|
||||
try:
|
||||
driver.implicitly_wait(4)
|
||||
print("Selecting join")
|
||||
report.step_start("Clicking JOIN")
|
||||
joinBTN = driver.find_element_by_xpath("//*[@label='Join']")
|
||||
joinBTN.click()
|
||||
except Exception as e:
|
||||
print("Join Button Not Enabled...Password may not be needed")
|
||||
logging.warning("Join Button Not Enabled...Password may not be needed")
|
||||
# ---------------------Click on join-------------------------------
|
||||
|
||||
# ---------------------check if internet-------------------------------
|
||||
try:
|
||||
driver.implicitly_wait(5)
|
||||
WifiInternetErrMsg2 = driver.find_element_by_xpath("//*[@label='No Internet Connection']")
|
||||
# = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text
|
||||
except Exception as e:
|
||||
is_internet = True
|
||||
print("No Wifi-AP Error Internet Error: " + wifi_name)
|
||||
# Need to add Wait for Selected Wifi Xpath
|
||||
# time.sleep(3)
|
||||
# ---------------------check if internet-------------------------------
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
|
||||
# Gets the IP Address of the connected SSID from Phone
|
||||
def get_ip_address(self, ssid, setup_perfectoMobile, connData):
|
||||
wifi_name = ssid
|
||||
driver = setup_perfectoMobile[0]
|
||||
report = setup_perfectoMobile[1]
|
||||
# ---------------------Additional INFO-------------------------------
|
||||
try:
|
||||
driver.implicitly_wait(5)
|
||||
print("Selecting SSID: ", wifi_name)
|
||||
report.step_start("Additional details of SSID")
|
||||
additional_details_element = WebDriverWait(driver, 35).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH,
|
||||
"//*[@label='" + wifi_name + "']")))
|
||||
# //*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']
|
||||
additional_details_element.click()
|
||||
|
||||
try:
|
||||
driver.implicitly_wait(2)
|
||||
report.step_start("Checking SSID Name as Expected")
|
||||
print("Checking SSID Name")
|
||||
ssidname_text = driver.find_element_by_xpath("//*[@label='" + wifi_name + "']").text
|
||||
print(ssidname_text)
|
||||
if (ssidname_text == wifi_name):
|
||||
print("SSID Matched")
|
||||
logging.info("SSID Matched")
|
||||
allure.attach(name="SSID Matched ", body=str(wifi_name))
|
||||
else:
|
||||
print("SSID Not Matched")
|
||||
logging.info("SSID Not Matched")
|
||||
allure.attach(name="SSID Not Matched ", body=str(wifi_name))
|
||||
reportFlag = False
|
||||
assert reportFlag
|
||||
except:
|
||||
print("SSID is not Checked in more Info")
|
||||
logging.warning("SSID is not Checked in more Info")
|
||||
try:
|
||||
report.step_start("Checking WiFi Address")
|
||||
print("Checking WIFI address")
|
||||
# (//*[@label="IP Address"]/parent::*/XCUIElementTypeStaticText)[2]
|
||||
wifi_address_element_text = driver.find_element_by_xpath(
|
||||
"(//*[@label='Wi-Fi Address']/parent::*/XCUIElementTypeStaticText)[2]").text
|
||||
print("wifi_address_element_text: ", wifi_address_element_text)
|
||||
allure.attach(name="Connected SSID WiFi-Address: ", body=str(wifi_address_element_text))
|
||||
except Exception as e:
|
||||
print("WiFi-Address not Found")
|
||||
logging.warning("WiFi-Address not Found")
|
||||
try:
|
||||
time.sleep(4)
|
||||
report.step_start("Checking IP Address")
|
||||
print("Checking IP address")
|
||||
logging.info("Checking IP address")
|
||||
# (//*[@label="IP Address"]/parent::*/XCUIElementTypeStaticText)[2]
|
||||
ip_address_element_text = driver.find_element_by_xpath(
|
||||
"(//*[@label='IP Address']/parent::*/XCUIElementTypeStaticText)[2]").text
|
||||
print("ip_address_element_text: ", ip_address_element_text)
|
||||
except Exception as e:
|
||||
try:
|
||||
time.sleep(4)
|
||||
print("Scrolling for checking ip address")
|
||||
self.scrollDown(setup_perfectoMobile)
|
||||
ip_address_element_text = driver.find_element_by_xpath(
|
||||
"(//*[@label='IP Address']/parent::*/XCUIElementTypeStaticText)[2]").text
|
||||
print("ip_address_element_text: ", ip_address_element_text)
|
||||
except:
|
||||
print("IP Address not Found")
|
||||
logging.info("IP Address not Found")
|
||||
except Exception as e:
|
||||
print("Select Additional Info failed")
|
||||
logging.warning("Select Additional Info failed")
|
||||
# ---------------------Additional INFO-------------------------------
|
||||
return ip_address_element_text
|
||||
|
||||
def run_speed_test(self, setup_perfectoMobile, connData):
|
||||
print("\n-------------------------------------")
|
||||
print("Verify Upload & Download Speed")
|
||||
print("-------------------------------------")
|
||||
|
||||
report = setup_perfectoMobile[1]
|
||||
driver = setup_perfectoMobile[0]
|
||||
current_result = True
|
||||
|
||||
contexts = driver.contexts
|
||||
# print("Printing Context")
|
||||
# print(contexts)
|
||||
|
||||
driver.switch_to.context('WEBVIEW_1')
|
||||
time.sleep(5)
|
||||
try:
|
||||
print("Launching Safari")
|
||||
report.step_start("Google Home Page")
|
||||
time.sleep(4)
|
||||
driver.get(connData["webURL"])
|
||||
print("Enter Search Text")
|
||||
time.sleep(4)
|
||||
driver.find_element_by_xpath("//*[@class='gLFyf']").send_keys("Internet speed test")
|
||||
time.sleep(4)
|
||||
driver.find_element_by_xpath("//*[@class='aajZCb']//*[@class='nz2CCf']/li[1]/div[1]/div[1]").click()
|
||||
except:
|
||||
try:
|
||||
print("Finding search option")
|
||||
report.step_start("Input For Search")
|
||||
driver.implicitly_wait(4)
|
||||
driver.get(connData["webURL"])
|
||||
print("Enter Search Text")
|
||||
driver.implicitly_wait(4)
|
||||
element_find_txt = driver.find_element_by_xpath(connData["lblSearch"])
|
||||
element_find_txt.send_keys("Internet Speed Test")
|
||||
except Exception as e:
|
||||
print("Launching Safari Failed")
|
||||
print(e)
|
||||
|
||||
try:
|
||||
print("Click Run Speed Test Button...")
|
||||
report.step_start("Click Run Speed Test Button")
|
||||
driver.implicitly_wait(4)
|
||||
driver.find_element_by_xpath(connData["BtnRunSpeedTest"]).click()
|
||||
except NoSuchElementException:
|
||||
current_result = False
|
||||
print("Run Speed Test Button element not found", NoSuchElementException)
|
||||
return current_result
|
||||
|
||||
# Get upload/Download Speed
|
||||
try:
|
||||
report.step_start("Get upload/Download Speed")
|
||||
time.sleep(60)
|
||||
download_mbps = driver.find_element_by_xpath(connData["downloadMbps"])
|
||||
download_speed = download_mbps.text
|
||||
print("Download: " + download_speed + " Mbps")
|
||||
|
||||
time.sleep(30)
|
||||
upload_mbps = driver.find_element_by_xpath(connData["UploadMbps"])
|
||||
upload_speed = upload_mbps.text
|
||||
print("Upload: " + upload_speed + " Mbps")
|
||||
allure.attach(name="Speed Test logs: ",
|
||||
body=str("Upload: " + upload_speed + " Mbps" + " Download: " + download_speed + " Mbps"))
|
||||
print("Access Point Verification Completed Successfully")
|
||||
|
||||
except NoSuchElementException:
|
||||
print("Access Point Verification NOT Completed, checking Connection....")
|
||||
current_result = False
|
||||
return current_result
|
||||
#----------Wifi connect for Enterprise Security---------------
|
||||
def wifi_connect_eap(self, ssid, user, ttls_passwd, setup_perfectoMobile, connData):
|
||||
print("\n-------------------------------------")
|
||||
print("Select Wifi/Get IP Address IOS Connection")
|
||||
print("-------------------------------------")
|
||||
is_internet = False
|
||||
wifi_name = ssid
|
||||
ssid_found = False
|
||||
print("Verifying Wifi/AP Connection Details....")
|
||||
report = setup_perfectoMobile[1]
|
||||
driver = setup_perfectoMobile[0]
|
||||
|
||||
report.step_start("Switching Driver Context")
|
||||
print("Switching Context to Native")
|
||||
driver.switch_to.context('NATIVE_APP')
|
||||
# driver.switch_to.context(contexts[0])
|
||||
|
||||
report.step_start("Set Wifi Network to " + wifi_name)
|
||||
# Open Settings Application
|
||||
logging.info("Opening IOS setting APP")
|
||||
self.openApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
|
||||
try:
|
||||
time.sleep(2)
|
||||
driver.implicitly_wait(2)
|
||||
try:
|
||||
print("Verifying Connected Wifi Connection")
|
||||
report.step_start("Loading Wifi Page")
|
||||
element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']")
|
||||
element.click()
|
||||
except NoSuchElementException:
|
||||
print("Exception: Verify Xpath - unable to click on Wifi")
|
||||
logging.error("Exception: Verify Xpath - unable to click on Wifi")
|
||||
|
||||
time.sleep(2)
|
||||
driver.implicitly_wait(4)
|
||||
# --------------------To Turn on WIFi Switch if already OFF--------------------------------
|
||||
try:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']")
|
||||
get_wifi_switch_element_text = get_wifi_switch_element.text
|
||||
try:
|
||||
if get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']")
|
||||
driver.implicitly_wait(1)
|
||||
get_wifi_switch_element.click()
|
||||
driver.implicitly_wait(1)
|
||||
i = 0
|
||||
for i in range(5):
|
||||
try:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath(
|
||||
"//*[@label='Wi-Fi' and @value='1']")
|
||||
get_wifi_switch_element_text = get_wifi_switch_element.text
|
||||
except:
|
||||
print("Switch is OFF")
|
||||
logging.info("Wifi Switch is OFF")
|
||||
|
||||
if get_wifi_switch_element_text == "1" or get_wifi_switch_element_text == 1:
|
||||
print("WIFI Switch is ON")
|
||||
logging.info("Wifi Switch is ON")
|
||||
break
|
||||
else:
|
||||
try:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath(
|
||||
"//*[@label='Wi-Fi' and @value='0']")
|
||||
get_wifi_switch_element_text = get_wifi_switch_element.text
|
||||
except:
|
||||
print("WIFi switch is ON")
|
||||
logging.info("Wifi Switch is ON")
|
||||
if (get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0):
|
||||
print("switch is still OFF")
|
||||
logging.error("Wifi Switch is OFF")
|
||||
self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
else:
|
||||
print("Switch is Still OFF")
|
||||
logging.error("Wifi Switch is OFF")
|
||||
self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
except:
|
||||
print("No switch element found")
|
||||
logging.error("No switch element found")
|
||||
except:
|
||||
print("get_wifi_switch_element is ON")
|
||||
logging.warning("get_wifi_switch_element is ON")
|
||||
# --------------------To Turn on WIFi Switch if already OFF--------------------------------
|
||||
|
||||
except:
|
||||
print("Cannot find WIFI element")
|
||||
logging.error("Cannot find WIFI element")
|
||||
self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
|
||||
# ---------------------This is to Forget current connected SSID-------------------------------
|
||||
# ---------------------This to Avoid any popup page from captive portal--------------------#
|
||||
|
||||
try:
|
||||
time.sleep(4)
|
||||
print("getting in to Additional details")
|
||||
report.step_start("Clicking More Info")
|
||||
logging.info("getting in to Additional details")
|
||||
additional_details_element = driver.find_element_by_xpath(
|
||||
"//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']")
|
||||
additional_details_element.click()
|
||||
try:
|
||||
time.sleep(2)
|
||||
print("Forget Connected Network")
|
||||
logging.info("Forget Connected Network")
|
||||
forget_ssid = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']")))
|
||||
forget_ssid.click()
|
||||
print("Forget old ssid")
|
||||
logging.info("Forget old ssid")
|
||||
try:
|
||||
time.sleep(2)
|
||||
report.step_start("Forget SSID popup1")
|
||||
forget_ssid_popup = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']")))
|
||||
forget_ssid_popup.click()
|
||||
|
||||
print("**alert** Forget SSID popup killed **alert**")
|
||||
except:
|
||||
print("Forget SSID popup not found")
|
||||
except:
|
||||
print("couldn't find forget ssid element")
|
||||
logging.warning("couldn't find forget ssid element")
|
||||
except:
|
||||
print("No connected SSID")
|
||||
logging.info("No connected SSID")
|
||||
try:
|
||||
report.step_start("Unexpected Captive Popup")
|
||||
print("Unexpeceted Captive Poped Up")
|
||||
captive_portal_cancel_element = driver.find_element_by_xpath("//*[@label='Cancel']")
|
||||
captive_portal_cancel_element.click()
|
||||
time.sleep(2)
|
||||
use_other_network_element = driver.find_element_by_xpath("//*[@label='Use Other Network']")
|
||||
use_other_network_element.click()
|
||||
time.sleep(2)
|
||||
except:
|
||||
print("No Captive Portal Popup Found")
|
||||
try:
|
||||
time.sleep(4)
|
||||
print("getting in to Additional details")
|
||||
report.step_start("Clicking More Info")
|
||||
additional_details_element = driver.find_element_by_xpath(
|
||||
"//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']")
|
||||
additional_details_element.click()
|
||||
try:
|
||||
time.sleep(2)
|
||||
print("Forget Connected Network")
|
||||
forget_ssid = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget This Network']")))
|
||||
forget_ssid.click()
|
||||
print("Forget old ssid")
|
||||
try:
|
||||
time.sleep(2)
|
||||
report.step_start("Forget SSID popup1")
|
||||
forget_ssid_popup = WebDriverWait(driver, 30).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Forget']")))
|
||||
forget_ssid_popup.click()
|
||||
|
||||
print("**alert** Forget SSID popup killed **alert**")
|
||||
except:
|
||||
print("Forget SSID popup not found")
|
||||
except:
|
||||
print("couldn't find forget ssid element")
|
||||
except:
|
||||
print("No connected SSID")
|
||||
|
||||
# ---------------------This is to Forget current connected SSID-------------------------------
|
||||
|
||||
# ---------------------To get all available SSID and select it-------------------------------
|
||||
print("Searching for Wifi: " + wifi_name)
|
||||
# allure.attach(name= body=str("Searching for Wifi: " + wifi_name))
|
||||
time.sleep(2)
|
||||
report.step_start("Searching SSID")
|
||||
print("Selecting Wifi: " + wifi_name)
|
||||
ssid_found = False
|
||||
available_ssids = False
|
||||
|
||||
try:
|
||||
for check_for_all_ssids in range(12):
|
||||
available_ssids = self.get_all_available_ssids(driver)
|
||||
allure.attach(name="Available SSIDs in device: ", body=str(available_ssids))
|
||||
try:
|
||||
if (not self.ssid_Visible(driver, wifi_name)) or (wifi_name not in available_ssids):
|
||||
self.scrollDown(setup_perfectoMobile)
|
||||
time.sleep(2)
|
||||
else:
|
||||
try:
|
||||
driver.implicitly_wait(8)
|
||||
report.step_start("Selecting SSID To Connect")
|
||||
ssid_found = True
|
||||
print(wifi_name + " : Found in Device")
|
||||
wifi_sel_element = WebDriverWait(driver, 35).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='" + wifi_name + "']")))
|
||||
print(wifi_sel_element)
|
||||
wifi_sel_element.click()
|
||||
print("Selecting SSID")
|
||||
break
|
||||
except:
|
||||
print("SSID unable to select")
|
||||
logging.error("Unable to select SSID")
|
||||
report.step_start("Selecting Unable SSID To Connect")
|
||||
self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
|
||||
except:
|
||||
print("couldn't connect to " + wifi_name)
|
||||
logging.error("Couldn't Find ssid")
|
||||
# request.config.cache.set(key="SelectingWifiFailed", value=str(e))
|
||||
self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
pass
|
||||
|
||||
if not ssid_found:
|
||||
print("could not found " + wifi_name + " in device")
|
||||
logging.error("Couldn't Find ssid in device")
|
||||
self.closeApp(self.connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
except:
|
||||
pass
|
||||
# ---------------------To get all available SSID and select it-------------------------------
|
||||
# Set username
|
||||
# -------------------------------------------------------
|
||||
try:
|
||||
driver.implicitly_wait(4)
|
||||
report.step_start("Entering User")
|
||||
print("Entering User name")
|
||||
logging.info("Entering User name")
|
||||
wifi_user_element = WebDriverWait(driver, 35).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Username']")))
|
||||
wifi_user_element.send_keys(user)
|
||||
except NoSuchElementException:
|
||||
print("Password Page Not Loaded, password May be cached in the System")
|
||||
logging.error("Password Page Not Loaded, password May be cached in the System")
|
||||
# -------------------------------------------------------
|
||||
|
||||
# ---------------------Set Password-------------------------------
|
||||
try:
|
||||
driver.implicitly_wait(4)
|
||||
report.step_start("Entering Password")
|
||||
print("Entering password")
|
||||
wifi_password = WebDriverWait(driver, 35).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Password']")))
|
||||
wifi_password.send_keys(ttls_passwd)
|
||||
except NoSuchElementException:
|
||||
print("Enter Password Page Not Loaded")
|
||||
logging.error("Enter Password Page Not Loaded")
|
||||
# ---------------------Set Password-------------------------------
|
||||
# -------------------------------------------------------
|
||||
|
||||
# ---------------------Click on join-------------------------------
|
||||
try:
|
||||
driver.implicitly_wait(4)
|
||||
report.step_start("Clicking Join")
|
||||
print("Clicking Join")
|
||||
join_btn = WebDriverWait(driver, 35).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Join']")))
|
||||
join_btn.click()
|
||||
except Exception as e:
|
||||
print("Join Button Not Enabled...Password may not be needed")
|
||||
logging.error("Join Button Not Enabled...Password may not be needed")
|
||||
# ---------------------Click on join-------------------------------
|
||||
# Selecting certificate
|
||||
# -------------------------------------------------------
|
||||
try:
|
||||
driver.implicitly_wait(4)
|
||||
report.step_start("Clicking Trust CA Cert")
|
||||
print("Clicking Trust CA Cert")
|
||||
cert_element = WebDriverWait(driver, 45).until(
|
||||
EC.presence_of_element_located((MobileBy.XPATH, "//*[@label='Trust']")))
|
||||
cert_element.click()
|
||||
except NoSuchElementException:
|
||||
print("Password Page Not Loaded, password May be cached in the System")
|
||||
logging.error("Password Page Not Loaded, password May be cached in the System")
|
||||
|
||||
# ---------------------check if internet-------------------------------
|
||||
try:
|
||||
driver.implicitly_wait(5)
|
||||
wifi_internet_err_msg = driver.find_element_by_xpath("//*[@label='No Internet Connection']")
|
||||
# = driver.find_element_by_xpath("//*[@label='No Internet Connection']").text
|
||||
except Exception as e:
|
||||
is_internet = True
|
||||
print("No Wifi-AP Error Internet Error: " + wifi_name)
|
||||
logging.error("No Wifi-AP Error Internet Error: " + wifi_name)
|
||||
# Need to add Wait for Selected Wifi Xpath
|
||||
# time.sleep(3)
|
||||
# ---------------------check if internet-------------------------------
|
||||
return is_internet, setup_perfectoMobile, ssid_found
|
||||
|
||||
def wifi_disconnect(self, ssid, setup_perfectoMobile, connData):
|
||||
print("\n-------------------------------------")
|
||||
print("Wifi Disconnect and Forget Connection")
|
||||
print("-------------------------------------")
|
||||
print("Verifying Wifi/AP Connection Details....")
|
||||
report = setup_perfectoMobile[1]
|
||||
driver = setup_perfectoMobile[0]
|
||||
|
||||
report.step_start("Switching Driver Context")
|
||||
print("Switching Context to Native")
|
||||
driver.switch_to.context('NATIVE_APP')
|
||||
# driver.switch_to.context(contexts[0])
|
||||
|
||||
report.step_start("Set Wifi Network to " + ssid)
|
||||
# Open Settings Application
|
||||
self.openApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
|
||||
try:
|
||||
time.sleep(2)
|
||||
driver.implicitly_wait(2)
|
||||
try:
|
||||
print("Verifying Connected Wifi Connection")
|
||||
report.step_start("Loading Wifi Page")
|
||||
element = driver.find_element_by_xpath("//XCUIElementTypeCell[@name='Wi-Fi']")
|
||||
element.click()
|
||||
except NoSuchElementException:
|
||||
print("Exception: Verify Xpath - unable to click on Wifi")
|
||||
|
||||
time.sleep(2)
|
||||
driver.implicitly_wait(2)
|
||||
# --------------------To Turn on WIFi Switch if already OFF--------------------------------
|
||||
try:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']")
|
||||
get_wifi_switch_element_text = get_wifi_switch_element.text
|
||||
if get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']")
|
||||
driver.implicitly_wait(1)
|
||||
get_wifi_switch_element.click()
|
||||
driver.implicitly_wait(1)
|
||||
i = 0
|
||||
for i in range(5):
|
||||
try:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']")
|
||||
get_wifi_switch_element_text = get_wifi_switch_element.text
|
||||
except:
|
||||
print("switch is OFF")
|
||||
|
||||
if get_wifi_switch_element_text == "1" or get_wifi_switch_element_text == 1:
|
||||
print("WIFI Switch is ON")
|
||||
break
|
||||
else:
|
||||
try:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath(
|
||||
"//*[@label='Wi-Fi' and @value='0']")
|
||||
get_wifi_switch_element_text = get_wifi_switch_element.text
|
||||
except:
|
||||
print("WIFi switch is ON")
|
||||
if (get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0):
|
||||
print("switch is still OFF")
|
||||
self.closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
else:
|
||||
print("Switch is Still OFF")
|
||||
self.closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
except:
|
||||
print("get_wifi_switch_element is ON")
|
||||
# --------------------To Turn on WIFi Switch if already OFF--------------------------------
|
||||
|
||||
except:
|
||||
print("Cannot find WIFI element")
|
||||
self.closeApp(connData["bundleId-iOS-Settings"], setup_perfectoMobile)
|
||||
|
||||
# ---------------------This is to Forget current connected SSID-------------------------------
|
||||
|
||||
try:
|
||||
print("getting in to Additional details")
|
||||
additional_details_element = driver.find_element_by_xpath(
|
||||
"//*[@label='selected']/parent::*/parent::*/XCUIElementTypeButton[@label='More Info']")
|
||||
additional_details_element.click()
|
||||
try:
|
||||
print("Forget Connected Network")
|
||||
forget_ssid = driver.find_element_by_xpath("//*[@label='Forget This Network']")
|
||||
forget_ssid.click()
|
||||
print("Forget old ssid")
|
||||
try:
|
||||
report.step_start("Forget SSID popup1")
|
||||
forget_ssid_popup = driver.find_element_by_xpath("//*[@label='Forget']")
|
||||
forget_ssid_popup.click()
|
||||
|
||||
print("**alert** Forget SSID popup killed **alert**")
|
||||
except:
|
||||
print("Forget SSID popup not found")
|
||||
except:
|
||||
print("couldn't find forget ssid element")
|
||||
except:
|
||||
print("No connected SSID")
|
||||
|
||||
# ---------------------This is to Forget current connected SSID-------------------------------
|
||||
# --------------------To Turn on WIFi Switch if already OFF--------------------------------
|
||||
try:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']")
|
||||
get_wifi_switch_element_text = get_wifi_switch_element.text
|
||||
print("switch state is : ", get_wifi_switch_element_text)
|
||||
try:
|
||||
if get_wifi_switch_element_text == "1" or get_wifi_switch_element_text == 1:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='1']")
|
||||
driver.implicitly_wait(1)
|
||||
get_wifi_switch_element.click()
|
||||
driver.implicitly_wait(1)
|
||||
i = 0
|
||||
for i in range(5):
|
||||
try:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath("//*[@label='Wi-Fi' and @value='0']")
|
||||
get_wifi_switch_element_text = get_wifi_switch_element.text
|
||||
except:
|
||||
print("switch is ON")
|
||||
|
||||
if get_wifi_switch_element_text == "0" or get_wifi_switch_element_text == 0:
|
||||
print("WIFI Switch is OFF")
|
||||
break
|
||||
else:
|
||||
try:
|
||||
get_wifi_switch_element = driver.find_element_by_xpath(
|
||||
"//*[@label='Wi-Fi' and @value='1']")
|
||||
get_wifi_switch_element.click()
|
||||
get_wifi_switch_element_text = get_wifi_switch_element.text
|
||||
except:
|
||||
print("WIFi switch is OFF")
|
||||
|
||||
else:
|
||||
print("Switch is Still OFF")
|
||||
except:
|
||||
pass
|
||||
except:
|
||||
print("get_wifi_switch_element is ON")
|
||||
# --------------------To Turn on WIFi Switch if already OFF--------------------------------
|
||||
|
||||
|
||||
def toggle_wifi_mode(self,ssid, setup_perfectoMobile, connData):
|
||||
print("\n-----------------------")
|
||||
|
||||
@@ -384,4 +384,3 @@ if __name__ == '__main__':
|
||||
#print(obj.enterprise_client_connect(ssid="ssid_wpa2_eap_5g", identity="nolaradius", ttls_passwd="nolastart"))
|
||||
print(obj.enterprise_toggle_wifi_mode_test(ssid="ssid_wpa_eap_5g_5O05610", identity="nolaradius",
|
||||
ttls_passwd="nolastart"))
|
||||
|
||||
|
||||
@@ -19,3 +19,4 @@ setuptools.setup(
|
||||
"Operating System :: OS Independent",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
"""
|
||||
Telecom Infra Project OpenWifi 2.X (Ucentral libraries for Test Automation)
|
||||
|
||||
|
||||
"""
|
||||
import importlib
|
||||
|
||||
logging = importlib.import_module("logging")
|
||||
|
||||
ap_lib = importlib.import_module("ap_lib")
|
||||
controller = importlib.import_module("controller")
|
||||
|
||||
"""
|
||||
Custom Class Imports needed for OpenWifi 2.X
|
||||
"""
|
||||
|
||||
ConfigureController = controller.ConfigureController
|
||||
Controller = controller.Controller
|
||||
FMSUtils = controller.FMSUtils
|
||||
ProvUtils = controller.ProvUtils
|
||||
UProfileUtility = controller.UProfileUtility
|
||||
|
||||
APLIBS = ap_lib.APLIBS
|
||||
|
||||
"""
|
||||
Setting default Logging
|
||||
"""
|
||||
|
||||
|
||||
class tip_2x:
|
||||
"""
|
||||
Standard OpenWifi wlan-testing specific variables
|
||||
|
||||
"""
|
||||
controller_data = {}
|
||||
device_under_tests_info = []
|
||||
|
||||
"""
|
||||
OpenWifi 2.x Specific Variables that will be only scoped in tip_2x Library
|
||||
|
||||
"""
|
||||
ow_sec_url = ""
|
||||
ow_sec_login_username = ""
|
||||
ow_sec_login_password = ""
|
||||
|
||||
controller_library_object = object()
|
||||
dut_library_object = object()
|
||||
|
||||
def __init__(self, controller_data=None,
|
||||
device_under_tests_info=[], logging_level=logging.INFO):
|
||||
logging.basicConfig(format='%(asctime)s - %(message)s', level=logging_level)
|
||||
if controller_data is None:
|
||||
controller_data = {}
|
||||
self.controller_data = controller_data
|
||||
self.device_under_tests_info = device_under_tests_info
|
||||
self.setup_metadata()
|
||||
|
||||
"""
|
||||
Controller and Access Point specific metadata that is related to OpenWifi 2.x
|
||||
"""
|
||||
|
||||
def setup_metadata(self):
|
||||
logging.info("setting up the Controller metadata for tip_2x Library: " + str(self.controller_data))
|
||||
logging.info("setting up the DUT metadata for tip_2x Library: " + str(self.device_under_tests_info))
|
||||
logging.info("Number of DUT's configured: " + str(len(self.device_under_tests_info)))
|
||||
self.ow_sec_url = self.controller_data["url"]
|
||||
self.ow_sec_login_username = self.controller_data["username"]
|
||||
self.ow_sec_login_password = self.controller_data["password"]
|
||||
|
||||
def setup_objects(self):
|
||||
self.controller_library_object = Controller()
|
||||
self.dut_library_object = APLIBS()
|
||||
|
||||
""" Standard getter methods. Should be available for all type of libraries. Commonly used by wlan-testing"""
|
||||
|
||||
def get_dut_library_object(self):
|
||||
return self.dut_library_object
|
||||
|
||||
def get_controller_library_object(self):
|
||||
return self.controller_library_object
|
||||
|
||||
def get_controller_data(self):
|
||||
return self.controller_data
|
||||
|
||||
def get_device_under_tests_info(self):
|
||||
return self.device_under_tests_info
|
||||
|
||||
def get_number_of_dut(self):
|
||||
return len(self.device_under_tests_info)
|
||||
|
||||
def get_dut_logs(self, dut_idx=0):
|
||||
return self.dut_library_object.get_logs(idx=0)
|
||||
|
||||
def get_controller_logs(self):
|
||||
return ""
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
basic_1 = {
|
||||
"target": "tip_2x",
|
||||
"controller": {
|
||||
"url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001",
|
||||
"username": "tip@ucentral.com",
|
||||
"password": "OpenWifi%123"
|
||||
},
|
||||
"device_under_tests": [{
|
||||
"model": "wallys_dr40x9",
|
||||
"mode": "wifi5",
|
||||
"serial": "c44bd1005b30",
|
||||
"jumphost": True,
|
||||
"ip": "10.28.3.100",
|
||||
"username": "lanforge",
|
||||
"password": "pumpkin77",
|
||||
"port": 22,
|
||||
"serial_tty": "/dev/ttyAP8",
|
||||
"version": "next-latest"
|
||||
}],
|
||||
"traffic_generator": {}
|
||||
}
|
||||
var = tip_2x(controller_data=basic_1["controller"], device_under_tests_info=basic_1["device_under_tests"])
|
||||
|
||||
@@ -1546,6 +1546,310 @@ class ProvUtils:
|
||||
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
||||
return resp
|
||||
|
||||
def get_map(self):
|
||||
uri = self.sdk_client.build_url_prov("map")
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
||||
return resp
|
||||
|
||||
def get_map_by_id(self, map_id):
|
||||
uri = self.sdk_client.build_url_prov("map/" + map_id)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
||||
return resp
|
||||
|
||||
def add_map(self, payload):
|
||||
uri = self.sdk_client.build_url_prov("map/0")
|
||||
payload = json.dumps(payload)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
||||
return resp
|
||||
|
||||
def delete_map(self, map_id):
|
||||
uri = self.sdk_client.build_url_prov("map/" + map_id)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
||||
return resp
|
||||
|
||||
def edit_map(self, payload, map_id):
|
||||
uri = self.sdk_client.build_url_prov("map/" + map_id)
|
||||
payload = json.dumps(payload)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
||||
return resp
|
||||
|
||||
def get_operator(self):
|
||||
uri = self.sdk_client.build_url_prov("operator")
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
||||
return resp
|
||||
|
||||
def get_operator_by_id(self, operator_id):
|
||||
uri = self.sdk_client.build_url_prov("operator/" + operator_id)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
||||
return resp
|
||||
|
||||
def add_operator(self, payload):
|
||||
uri = self.sdk_client.build_url_prov("operator/1")
|
||||
payload = json.dumps(payload)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
||||
return resp
|
||||
|
||||
def delete_operator(self, operator_id):
|
||||
uri = self.sdk_client.build_url_prov("operator/" + operator_id)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
||||
return resp
|
||||
|
||||
def edit_operator(self, payload, operator_id):
|
||||
uri = self.sdk_client.build_url_prov("operator/" + operator_id)
|
||||
payload = json.dumps(payload)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
||||
return resp
|
||||
|
||||
def get_service_class_by_operator_id(self, operator_id):
|
||||
uri = self.sdk_client.build_url_prov("serviceClass?operatorId=" + operator_id)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
||||
return resp
|
||||
|
||||
def get_service_class_by_id(self, service_class_id):
|
||||
uri = self.sdk_client.build_url_prov("serviceClass/" + service_class_id)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
||||
return resp
|
||||
|
||||
def add_service_class(self, payload):
|
||||
uri = self.sdk_client.build_url_prov("serviceClass/1")
|
||||
payload = json.dumps(payload)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
||||
return resp
|
||||
|
||||
def delete_service_class(self, service_class_id):
|
||||
uri = self.sdk_client.build_url_prov("serviceClass/" + service_class_id)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
||||
return resp
|
||||
|
||||
def edit_service_class(self, payload, service_class_id):
|
||||
uri = self.sdk_client.build_url_prov("serviceClass/" + service_class_id)
|
||||
payload = json.dumps(payload)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
||||
return resp
|
||||
|
||||
def get_configuration(self):
|
||||
uri = self.sdk_client.build_url_prov("configuration")
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
||||
return resp
|
||||
|
||||
def get_configuration_by_id(self, configuration_id):
|
||||
uri = self.sdk_client.build_url_prov("configuration/" + configuration_id)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.get(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("GET", resp, self.sdk_client.make_headers(), "", uri)
|
||||
return resp
|
||||
|
||||
def add_configuration(self, payload):
|
||||
uri = self.sdk_client.build_url_prov("configuration/1")
|
||||
payload = json.dumps(payload)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.post(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("POST", resp, self.sdk_client.make_headers(), payload, uri)
|
||||
return resp
|
||||
|
||||
def delete_configuration(self, configuration_id):
|
||||
uri = self.sdk_client.build_url_prov("configuration/" + configuration_id)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.delete(uri, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("DELETE", resp, self.sdk_client.make_headers(), "", uri)
|
||||
return resp
|
||||
|
||||
def edit_configuration(self, payload, configuration_id):
|
||||
uri = self.sdk_client.build_url_prov("configuration/" + configuration_id)
|
||||
payload = json.dumps(payload)
|
||||
logging.info("Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
allure.attach(name="Sending Command:", body="Sending Command: " + "\n" +
|
||||
"TimeStamp: " + str(datetime.datetime.utcnow()) + "\n" +
|
||||
"URI: " + str(uri) + "\n" +
|
||||
"Data: " + str(payload) + "\n" +
|
||||
"Headers: " + str(self.sdk_client.make_headers()))
|
||||
resp = requests.put(uri, data=payload, headers=self.sdk_client.make_headers(), verify=False, timeout=100)
|
||||
self.sdk_client.check_response("PUT", resp, self.sdk_client.make_headers(), payload, uri)
|
||||
return resp
|
||||
|
||||
|
||||
class UProfileUtility:
|
||||
|
||||
|
||||
@@ -124,6 +124,9 @@ class tip_2x:
|
||||
def teardown_objects(self):
|
||||
self.controller_library_object.logout()
|
||||
|
||||
def teardown_objects(self):
|
||||
self.controller_library_object.logout()
|
||||
|
||||
""" Standard getter methods. Should be available for all type of libraries. Commonly used by wlan-testing"""
|
||||
|
||||
def get_dut_library_object(self):
|
||||
@@ -429,7 +432,6 @@ class tip_2x:
|
||||
a["frequency"] = temp[j][2]
|
||||
ret_val[dut]["radio_data"][j] = a
|
||||
return ret_val
|
||||
|
||||
"""
|
||||
setup_special_configuration - Method to configure APs in mesh operating modes with multiple SSID's and multiple AP's
|
||||
This covers, mesh and other roaming scenarios which includes any special type of modes
|
||||
|
||||
@@ -259,4 +259,3 @@ markers =
|
||||
wpa_wpa2_enterprise_mixed: Use this marker to run wpa_wpa2_enterprise_mixed Encryption tests in each of the above test plans/suites
|
||||
wpa3_enterprise_mixed: Use this marker to run wpa3_enterprise_mixed Encryption tests in each of the above test plans/suites
|
||||
" >> tests/pytest.ini
|
||||
|
||||
|
||||
@@ -859,6 +859,243 @@ Create_lab_info_json()
|
||||
},
|
||||
"lan_ports": {
|
||||
|
||||
},
|
||||
"uplink_nat_ports": {
|
||||
"1.1.eth3": {
|
||||
"addressing": "static",
|
||||
"ip": "10.28.2.14",
|
||||
"gateway_ip": "10.28.2.1/24",
|
||||
"ip_mask": "255.255.255.0",
|
||||
"dns_servers": "BLANK"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"basic-07" : {
|
||||
"target": "tip_2x",
|
||||
"controller" : {
|
||||
"url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001",
|
||||
"username": "tip@ucentral.com",
|
||||
"password": "OpenWifi%123"
|
||||
},
|
||||
"device_under_tests": [{
|
||||
"model": "edgecore_eap101",
|
||||
"supported_bands": ["2G", "5G"],
|
||||
"supported_modes": ["BRIDGE", "NAT", "VLAN"],
|
||||
"wan_port": "1.1.eth2",
|
||||
"lan_port": null,
|
||||
"ssid": {
|
||||
"2g-ssid": "OpenWifi",
|
||||
"5g-ssid": "OpenWifi",
|
||||
"6g-ssid": "OpenWifi",
|
||||
"2g-password": "OpenWifi",
|
||||
"5g-password": "OpenWifi",
|
||||
"6g-password": "OpenWifi",
|
||||
"2g-encryption": "WPA2",
|
||||
"5g-encryption": "WPA2",
|
||||
"6g-encryption": "WPA3",
|
||||
"2g-bssid": "68:7d:b4:5f:5c:31",
|
||||
"5g-bssid": "68:7d:b4:5f:5c:3c",
|
||||
"6g-bssid": "68:7d:b4:5f:5c:38"
|
||||
},
|
||||
"mode": "wifi6",
|
||||
"identifier": "903cb36ae4a8",
|
||||
"method": "serial",
|
||||
"host_ip": "localhost",
|
||||
"host_username": "lanforge",
|
||||
"host_password": "pumpkin77",
|
||||
"host_ssh_port":' $basic7_lab_ctlr',
|
||||
"serial_tty": "/dev/ttyAP3",
|
||||
"firmware_version": "next-latest"
|
||||
}],
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"testbed": "basic",
|
||||
"scenario": "dhcp-bridge",
|
||||
"details": {
|
||||
"manager_ip": "localhost",
|
||||
"http_port":' $basic7_8080',
|
||||
"ssh_port":' $basic7_22',
|
||||
"setup": {"method": "build", "DB": "Test_Scenario_Automation"},
|
||||
"wan_ports": {
|
||||
"1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": {
|
||||
"lease-first": 10,
|
||||
"lease-count": 10000,
|
||||
"lease-time": "6h"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lan_ports": {
|
||||
|
||||
},
|
||||
"uplink_nat_ports": {
|
||||
"1.1.eth3": {
|
||||
"addressing": "static",
|
||||
"ip": "10.28.2.18",
|
||||
"gateway_ip": "10.28.2.1/24",
|
||||
"ip_mask": "255.255.255.0",
|
||||
"dns_servers": "BLANK"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"basic-08" : {
|
||||
"target": "tip_2x",
|
||||
"controller" : {
|
||||
"url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001",
|
||||
"username": "tip@ucentral.com",
|
||||
"password": "OpenWifi%123"
|
||||
},
|
||||
"device_under_tests": [{
|
||||
"model": "liteon-wpx8324",
|
||||
"supported_bands": ["2G", "5G"],
|
||||
"supported_modes": ["BRIDGE", "NAT", "VLAN"],
|
||||
"wan_port": "1.1.eth2",
|
||||
"lan_port": null,
|
||||
"ssid": {},
|
||||
"mode": "wifi6",
|
||||
"identifier": "e8c74f202600",
|
||||
"method": "serial",
|
||||
"host_ip": "localhost",
|
||||
"host_username": "lanforge",
|
||||
"host_password": "pumpkin77",
|
||||
"host_ssh_port": '$basic8_lab_ctlr',
|
||||
"serial_tty": "/dev/ttyAP5",
|
||||
"firmware_version": "next-latest"
|
||||
}],
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"testbed": "basic",
|
||||
"scenario": "dhcp-bridge",
|
||||
"details": {
|
||||
"manager_ip": "localhost",
|
||||
"http_port": '$basic8_8080',
|
||||
"ssh_port": '$basic8_22',
|
||||
"setup": {"method": "build", "DB": "Test_Scenario_Automation"},
|
||||
"wan_ports": {
|
||||
"1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": {
|
||||
"lease-first": 10,
|
||||
"lease-count": 10000,
|
||||
"lease-time": "6h"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lan_ports": {
|
||||
|
||||
},
|
||||
"uplink_nat_ports": {
|
||||
"1.1.eth3": {
|
||||
"addressing": "static",
|
||||
"ip": "10.28.2.19",
|
||||
"gateway_ip": "10.28.2.1/24",
|
||||
"ip_mask": "255.255.255.0",
|
||||
"dns_servers": "BLANK"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"basic-08a" : {
|
||||
"target": "tip_2x",
|
||||
"controller" : {
|
||||
"url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001",
|
||||
"username": "tip@ucentral.com",
|
||||
"password": "OpenWifi%123"
|
||||
},
|
||||
"device_under_tests": [{
|
||||
"model": "udaya_a5-id2",
|
||||
"supported_bands": ["2G", "5G"],
|
||||
"supported_modes": ["BRIDGE", "NAT", "VLAN"],
|
||||
"wan_port": "1.1.eth2",
|
||||
"lan_port": null,
|
||||
"ssid": {},
|
||||
"mode": "wifi6",
|
||||
"identifier": "50987100327b",
|
||||
"method": "serial",
|
||||
"host_ip": "10.28.3.103",
|
||||
"host_username": "lanforge",
|
||||
"host_password": "pumpkin77",
|
||||
"host_ssh_port": '$basic8_lab_ctlr',
|
||||
"serial_tty": "/dev/ttyAP6",
|
||||
"firmware_version": "next-latest"
|
||||
}],
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"testbed": "basic",
|
||||
"scenario": "dhcp-bridge",
|
||||
"details": {
|
||||
"manager_ip": "localhost",
|
||||
"http_port": '$basic8_8080',
|
||||
"ssh_port": '$basic8_22',
|
||||
"setup": {"method": "build", "DB": "Test_Scenario_Automation"},
|
||||
"wan_ports": {
|
||||
"1.1.eth2": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": {
|
||||
"lease-first": 10,
|
||||
"lease-count": 10000,
|
||||
"lease-time": "6h"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lan_ports": {
|
||||
|
||||
},
|
||||
"uplink_nat_ports": {
|
||||
"1.1.eth3": {
|
||||
"addressing": "static",
|
||||
"ip": "10.28.2.19",
|
||||
"gateway_ip": "10.28.2.1/24",
|
||||
"ip_mask": "255.255.255.0",
|
||||
"dns_servers": "BLANK"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"advance-01" : {
|
||||
"target": "tip_2x",
|
||||
"controller" : {
|
||||
"url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001",
|
||||
"username": "tip@ucentral.com",
|
||||
"password": "OpenWifi%123"
|
||||
},
|
||||
"device_under_tests": [{
|
||||
"model": "cig_194c4",
|
||||
"supported_bands": ["2G", "5G", "6G"],
|
||||
"supported_modes": ["BRIDGE", "NAT", "VLAN"],
|
||||
"wan_port": "1.1.eth1",
|
||||
"lan_port": null,
|
||||
"ssid": {},
|
||||
"mode": "wifi6",
|
||||
"identifier": "f40b9fe78e03",
|
||||
"method": "serial",
|
||||
"host_ip": "localhost",
|
||||
"host_username": "lanforge",
|
||||
"host_password": "pumpkin77",
|
||||
"host_ssh_port": '$advance1_lab_ctlr',
|
||||
"serial_tty": "/dev/ttyAP2",
|
||||
"firmware_version": "next-latest"
|
||||
}],
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"testbed": "basic",
|
||||
"scenario": "dhcp-bridge",
|
||||
"details": {
|
||||
"manager_ip": "localhost",
|
||||
"http_port": '$advance1_8080',
|
||||
"ssh_port": '$advance1_22',
|
||||
"setup": {"method": "build", "DB": "Test_Scenario_Automation"},
|
||||
"wan_ports": {
|
||||
"1.1.eth1": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": {
|
||||
"lease-first": 10,
|
||||
"lease-count": 10000,
|
||||
"lease-time": "6h"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lan_ports": {
|
||||
|
||||
},
|
||||
"uplink_nat_ports": {
|
||||
"1.1.eth3": {
|
||||
@@ -941,6 +1178,75 @@ Create_lab_info_json()
|
||||
}
|
||||
}
|
||||
},
|
||||
"advance-02" : {
|
||||
"target": "tip_2x",
|
||||
"controller" : {
|
||||
"url": "https://sec-qa01.cicd.lab.wlan.tip.build:16001",
|
||||
"username": "tip@ucentral.com",
|
||||
"password": "OpenWifi%123"
|
||||
},
|
||||
"device_under_tests": [{
|
||||
"model": "edgecore_eap102",
|
||||
"supported_bands": ["2G", "5G"],
|
||||
"supported_modes": ["BRIDGE", "NAT", "VLAN"],
|
||||
"wan_port": "1.1.eth1",
|
||||
"lan_port": null,
|
||||
"ssid": {
|
||||
"2g-ssid": "OpenWifi",
|
||||
"5g-ssid": "OpenWifi",
|
||||
"6g-ssid": "OpenWifi",
|
||||
"2g-password": "OpenWifi",
|
||||
"5g-password": "OpenWifi",
|
||||
"6g-password": "OpenWifi",
|
||||
"2g-encryption": "WPA2",
|
||||
"5g-encryption": "WPA2",
|
||||
"6g-encryption": "WPA3",
|
||||
"2g-bssid": "68:7d:b4:5f:5c:31",
|
||||
"5g-bssid": "68:7d:b4:5f:5c:3c",
|
||||
"6g-bssid": "68:7d:b4:5f:5c:38"
|
||||
},
|
||||
"mode": "wifi6",
|
||||
"identifier": "903cb39d6958",
|
||||
"method": "serial",
|
||||
"host_ip": "localhost",
|
||||
"host_username": "lanforge",
|
||||
"host_password": "pumpkin77",
|
||||
"host_ssh_port": ' $advance2_lab_ctlr',
|
||||
"serial_tty": "/dev/ttyAP3",
|
||||
"firmware_version": "next-latest"
|
||||
}],
|
||||
"traffic_generator": {
|
||||
"name": "lanforge",
|
||||
"testbed": "basic",
|
||||
"scenario": "dhcp-bridge",
|
||||
"details": {
|
||||
"manager_ip": "localhost",
|
||||
"http_port": ' $advance2_8080',
|
||||
"ssh_port": ' $advance2_22',
|
||||
"setup": {"method": "build", "DB": "Test_Scenario_Automation"},
|
||||
"wan_ports": {
|
||||
"1.1.eth1": {"addressing": "dhcp-server", "subnet": "172.16.0.1/16", "dhcp": {
|
||||
"lease-first": 10,
|
||||
"lease-count": 10000,
|
||||
"lease-time": "6h"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lan_ports": {
|
||||
|
||||
},
|
||||
"uplink_nat_ports": {
|
||||
"1.1.eth3": {
|
||||
"addressing": "static",
|
||||
"ip": "10.28.2.15",
|
||||
"gateway_ip": "10.28.2.1/24",
|
||||
"ip_mask": "255.255.255.0",
|
||||
"dns_servers": "BLANK"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"advance-03" : {
|
||||
"target": "tip_2x",
|
||||
"controller" : {
|
||||
@@ -1001,7 +1307,7 @@ Create_lab_info_json()
|
||||
"uplink_nat_ports": {
|
||||
"1.3.eth3": {
|
||||
"addressing": "static",
|
||||
"ip": "10.28.2.39",
|
||||
"ip": "10.28.2.29",
|
||||
"gateway_ip": "10.28.2.1/24",
|
||||
"ip_mask": "255.255.255.0",
|
||||
"dns_servers": "BLANK"
|
||||
@@ -1310,5 +1616,3 @@ if [ "$lab" = "advance-03" ]; then
|
||||
else
|
||||
echo "Testbed is Not Available"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ PASSPOINT_RADIUS_ACCOUNTING_SERVER_DATA = data["PASSPOINT_RADIUS_ACCOUNTING_SERV
|
||||
|
||||
PASSPOINT = data["PASSPOINT"]
|
||||
|
||||
PASSPOINT = data["PASSPOINT"]
|
||||
|
||||
open_flow = data["open_flow"]
|
||||
|
||||
influx_params = data["influx_params"]
|
||||
@@ -199,6 +199,7 @@ def client_type(request):
|
||||
yield client_type
|
||||
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def get_security_flags():
|
||||
"""used to get the essential markers on security and band"""
|
||||
@@ -398,6 +399,18 @@ def rate_radius_accounting_info():
|
||||
yield configuration.RATE_LIMITING_RADIUS_ACCOUNTING_DATA
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def rate_radius_info():
|
||||
"""yields the radius server information from lab info file"""
|
||||
yield configuration.RATE_LIMITING_RADIUS_SERVER_DATA
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def rate_radius_accounting_info():
|
||||
"""yields the radius accounting information from lab info file"""
|
||||
yield configuration.RATE_LIMITING_RADIUS_ACCOUNTING_DATA
|
||||
|
||||
|
||||
@pytest.fixture(scope='session', autouse=True)
|
||||
def add_allure_environment_property(request: SubRequest) -> Optional[Callable]:
|
||||
environment_properties = dict()
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
"""
|
||||
|
||||
Airtime Fairness Tests: BRIDGE Mode
|
||||
pytest -m "airtime_fairness_tests and wpa2_personal and bridge"
|
||||
|
||||
"""
|
||||
|
||||
import pytest
|
||||
import allure
|
||||
import os
|
||||
import time
|
||||
import pandas as pd
|
||||
import logging
|
||||
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.atf, pytest.mark.bridge]
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.airtime_fairness_tests, pytest.mark.wpa2_personal, pytest.mark.bridge]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
@@ -23,150 +30,59 @@ setup_params_general = {
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.feature("Air Time Fairness Test")
|
||||
@allure.parent_suite("Air Time Fairness Test")
|
||||
@allure.suite("BRIDGE Mode")
|
||||
@allure.sub_suite("WPA2 Personal Security")
|
||||
@allure.parent_suite("Airtime Fairness Tests")
|
||||
@allure.suite("WPA2 Personal Security")
|
||||
@allure.sub_suite("Bridge Mode")
|
||||
@allure.feature("green field & medium distanced & legacy stations")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestAtfBridge(object):
|
||||
"""
|
||||
BRIDGE Mode Airtime Fairness Test with wpa2 personal encryption
|
||||
pytest -m "airtime_fairness_tests and bridge and wpa2_personal"
|
||||
"""
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6394", name="WIFI-6394")
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.atf_2g
|
||||
@allure.title("Test for Airtime fairness of 2.4G")
|
||||
def test_atf_2g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
BRIDGE Mode Airtime Fairness Test with wpa2 personal encryption 2.4 GHz Band
|
||||
pytest -m "airtime_fairness_tests and bridge and twog and wpa2_personal and atf_2g"
|
||||
"""
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
band = 'twog'
|
||||
result, description = get_test_library.air_time_fairness(ssid=ssid_name, passkey=security_key, security="wpa2",
|
||||
mode=mode, band=band, vlan_id=vlan,atn=380,
|
||||
pass_value=[80,80,48], dut_data=setup_configuration)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6394", name="WIFI-6394")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.atf_sta1_greenfieldmode_sta2_atten30dB_2g
|
||||
@allure.title("Test for station 1 green field mode and station 2 with attenuation 30 dB 2.4 GHz")
|
||||
def test_atf_sta1_greenfieldmode_sta2_atten30dB_2g(self, lf_test, lf_tools, station_names_twog):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
station_name = station_names_twog[0]
|
||||
radio_name1 = lf_tools.twog_radios[0]
|
||||
radio_name2 = lf_tools.twog_radios[1]
|
||||
sta = []
|
||||
for i in range(2):
|
||||
sta.append(station_name + str(i))
|
||||
print(sta)
|
||||
atten_serial = lf_test.attenuator_serial_2g_radio(ssid=ssid_name, passkey=profile_data["security_key"], station_name=station_names_twog, lf_tools_obj=lf_tools)
|
||||
atten_serial_split = atten_serial[1].split(".")
|
||||
sta_ip1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
|
||||
radio=radio_name1, station_name=sta[0:1], sta_mode=11)
|
||||
sta_ip2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
|
||||
radio=radio_name2, station_name=sta[1:2], sta_mode=11)
|
||||
if (not sta_ip1) or (not sta_ip2):
|
||||
print("test failed due to no station ip")
|
||||
assert False
|
||||
for i in range(2):
|
||||
lf_test.attenuator_modify(int(atten_serial_split[2]), i, 300)
|
||||
time.sleep(0.5)
|
||||
wct_obj = lf_test.wifi_capacity(instance_name="atf_sta1_greenfieldmode_sta2_atten30dB_2g", mode=mode, vlan_id=vlan,
|
||||
download_rate="1Gbps", batch_size="1,2",
|
||||
upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", sort="linear")
|
||||
lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name)
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6395", name="WIFI-6395")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.atf_sta1_greenfieldmode_sta2_legacymode_2g
|
||||
@allure.title("Test for station 1 green field mode and station 2 legacy mode 2.4 GHz")
|
||||
def test_atf_sta1_greenfieldmode_sta2_legacymode_2g(self, lf_test, lf_tools, station_names_twog):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
station_name = station_names_twog[0]
|
||||
radio_name1 = lf_tools.twog_radios[0]
|
||||
radio_name2 = lf_tools.twog_radios[1]
|
||||
sta = []
|
||||
for i in range(2):
|
||||
sta.append(station_name + str(i))
|
||||
print(sta)
|
||||
sta_ip1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
|
||||
radio=radio_name1, station_name=sta[0:1], sta_mode=11)
|
||||
sta_ip2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
|
||||
radio=radio_name2, station_name=sta[1:2], sta_mode=2)
|
||||
if (not sta_ip1) or (not sta_ip2):
|
||||
print("test failed due to no station ip")
|
||||
assert False
|
||||
wct_obj = lf_test.wifi_capacity(instance_name="atf_sta1_greenfieldmode_sta2_legacymode_2g", mode=mode, vlan_id=vlan,
|
||||
download_rate="1Gbps", batch_size="1,2",
|
||||
upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", sort="linear")
|
||||
lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name)
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6396", name="WIFI-6396")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.atf_sta1_greenfieldmode_sta2_atten30dB_5g
|
||||
@allure.title("Test for station 1 green field mode and station 2 with attenuation 30 dB 5 GHz")
|
||||
def test_atf_sta1_greenfieldmode_sta2_atten30dB_5g(self, lf_test, lf_tools, station_names_fiveg):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
@pytest.mark.atf_5g
|
||||
@allure.title("Test for Airtime fairness of 5G")
|
||||
def test_atf_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
BRIDGE Mode Airtime Fairness Test with wpa2 personal encryption 5 GHz Band
|
||||
pytest -m "airtime_fairness_tests and bridge and fiveg and wpa2_personal and atf_5g"
|
||||
"""
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
station_name = station_names_fiveg[0]
|
||||
radio_name1 = lf_tools.fiveg_radios[0]
|
||||
radio_name2 = lf_tools.fiveg_radios[1]
|
||||
sta = []
|
||||
for i in range(2):
|
||||
sta.append(station_name + str(i))
|
||||
print(sta)
|
||||
atten_serial = lf_test.attenuator_serial_5g_radio(ssid=ssid_name, passkey=profile_data["security_key"],
|
||||
station_name=station_names_fiveg, lf_tools_obj=lf_tools)
|
||||
atten_serial_split = atten_serial[1].split(".")
|
||||
sta_ip1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
|
||||
radio=radio_name1, station_name=sta[0:1], sta_mode=9)
|
||||
sta_ip2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
|
||||
radio=radio_name2, station_name=sta[1:2], sta_mode=9)
|
||||
if (not sta_ip1) or (not sta_ip2):
|
||||
print("test failed due to no station ip")
|
||||
assert False
|
||||
for i in range(2):
|
||||
lf_test.attenuator_modify(int(atten_serial_split[2]), i, 300)
|
||||
time.sleep(0.5)
|
||||
wct_obj = lf_test.wifi_capacity(instance_name="atf_sta1_greenfieldmode_sta2_atten30dB_5g", mode=mode,
|
||||
vlan_id=vlan,
|
||||
download_rate="1Gbps", batch_size="1,2",
|
||||
upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", sort="linear")
|
||||
lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name)
|
||||
band = 'fiveg'
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6397", name="WIFI-6397")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.atf_sta1_greenfieldmode_sta2_legacymode_5g
|
||||
@allure.title("Test for station 1 green field mode and station 2 legacy mode 5 GHz")
|
||||
def test_atf_sta1_greenfieldmode_sta2_legacymode_5g(self, lf_test, lf_tools, station_names_fiveg):
|
||||
lf_tools.reset_scenario()
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
station_name = station_names_fiveg[0]
|
||||
radio_name1 = lf_tools.fiveg_radios[0]
|
||||
radio_name2 = lf_tools.fiveg_radios[1]
|
||||
sta = []
|
||||
for i in range(2):
|
||||
sta.append(station_name + str(i))
|
||||
print(sta)
|
||||
sta_ip1 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
|
||||
radio=radio_name1, station_name=sta[0:1], sta_mode=9)
|
||||
sta_ip2 = lf_test.Client_Connect_Using_Radio(ssid=ssid_name, passkey=profile_data["security_key"],
|
||||
radio=radio_name2, station_name=sta[1:2], sta_mode=1)
|
||||
if (not sta_ip1) or (not sta_ip2):
|
||||
print("test failed due to no station ip")
|
||||
assert False
|
||||
wct_obj = lf_test.wifi_capacity(instance_name="atf_sta1_greenfieldmode_sta2_legacymode_5g", mode=mode,
|
||||
vlan_id=vlan,
|
||||
download_rate="1Gbps", batch_size="1,2",
|
||||
upload_rate="1Gbps", protocol="UDP-IPv4", duration="60000", sort="linear")
|
||||
lf_test.Client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
report_name = wct_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name)
|
||||
result, description = get_test_library.air_time_fairness(ssid=ssid_name, passkey=security_key, security="wpa2",
|
||||
mode=mode, band=band, vlan_id=vlan, atn=250,
|
||||
pass_value=[500,470,260], dut_data=setup_configuration)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
@@ -1,21 +1,21 @@
|
||||
"""
|
||||
|
||||
Performance Test: Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m "downlink_mu_mimo and bridge and open and fiveg"
|
||||
pytest -m "mu_mimo_performance_tests and bridge and open"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.downlink_mu_mimo, pytest.mark.bridge, pytest.mark.open]
|
||||
pytestmark = [pytest.mark.mu_mimo_performance_tests, pytest.mark.bridge, pytest.mark.open]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"open": [
|
||||
{"ssid_name": "mu-mimo-open-5g", "appliedRadios": ["5G"]},
|
||||
{"ssid_name": "mu-mimo-open-2g", "appliedRadios": ["2G"]}
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"]},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"]}
|
||||
]
|
||||
},
|
||||
"rf": {
|
||||
@@ -42,28 +42,37 @@ setup_params_general = {
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Downlink MU_MIMO Tests")
|
||||
@allure.suite("Open Security")
|
||||
@allure.sub_suite("Bridge Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestMuMimoBridge(object):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge
|
||||
pytest -m mu_mimo_performance_tests and bridge
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_open_bridge_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
@allure.title("Test for Downlink MU-MIMO")
|
||||
def test_mu_mimo_open_bridge_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge and open and fiveg
|
||||
pytest -m mu_mimo_performance_tests and bridge and open and fiveg
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = "[BLANK]"
|
||||
security = "open"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
@@ -84,73 +93,19 @@ class TestMuMimoBridge(object):
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=True,
|
||||
skip_5g=False)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
assert True
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.open
|
||||
@pytest.mark.twog
|
||||
def test_mu_mimo_open_bridge_2g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge and open and twog
|
||||
"""
|
||||
print('lf tool')
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
print(port)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g,
|
||||
skip_2g=False,
|
||||
skip_5g=True)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, test="mu_mimo",
|
||||
ssid_name=ssid_name, security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, sniff_packets=False,
|
||||
tr398v2=False, tr398=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@@ -1,58 +1,65 @@
|
||||
"""
|
||||
|
||||
Performance Test: Downlink MU-MIMO Test: NAT Mode
|
||||
pytest -m "downlink_mu_mimo and nat and open and fiveg"
|
||||
pytest -m "mu_mimo_performance_tests and nat and open"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.downlink_mu_mimo, pytest.mark.nat, pytest.mark.open]
|
||||
pytestmark = [pytest.mark.mu_mimo_performance_tests, pytest.mark.nat, pytest.mark.open]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"open": [
|
||||
{"ssid_name": "mu-mimo-5g", "appliedRadios": ["5G"]},
|
||||
{"ssid_name": "mu-mimo-2g", "appliedRadios": ["2G"]}
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"]},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["2G"]}
|
||||
]
|
||||
},
|
||||
"rf": [],
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("performance")
|
||||
@allure.feature("NAT MODE open security and Downlink MU_MIMO Test")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Downlink MU_MIMO Tests")
|
||||
@allure.suite("Open Security")
|
||||
@allure.sub_suite("NAT Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestMuMimoNat(object):
|
||||
"""
|
||||
Downlink MU-MIMO Test: NAT MODE
|
||||
pytest -m downlink_mu_mimo and nat
|
||||
pytest -m mu_mimo_performance_tests and nat
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_open_nat_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
@allure.title("Test for Downlink MU-MIMO")
|
||||
def test_mu_mimo_open_nat_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Downlink MU-MIMO Test: NAT Mode
|
||||
pytest -m downlink_mu_mimo and nat and open and fiveg
|
||||
Downlink MU-MIMO Test: Nat Mode
|
||||
pytest -m mu_mimo_performance_tests and nat and open and fiveg
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "NAT"
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = "[BLANK]"
|
||||
security = "open"
|
||||
mode = "NAT-WAN"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
@@ -73,68 +80,19 @@ class TestMuMimoNat(object):
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=True,
|
||||
skip_5g=False)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, test="mu_mimo",
|
||||
ssid_name=ssid_name, security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, sniff_packets=False,
|
||||
tr398v2=False, tr398=True)
|
||||
if result:
|
||||
assert True
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_open_nat_2g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
"""
|
||||
Downlink MU-MIMO Test: NAT Mode
|
||||
pytest -m downlink_mu_mimo and nat and open and twog
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "NAT"
|
||||
vlan = 1
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=False,
|
||||
skip_5g=True)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
assert True
|
||||
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@@ -1,58 +1,64 @@
|
||||
"""
|
||||
|
||||
Performance Test: Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m "downlink_mu_mimo and vlan and open and fiveg"
|
||||
pytest -m "mu_mimo_performance_tests and vlan and open"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.downlink_mu_mimo, pytest.mark.vlan, pytest.mark.open]
|
||||
pytestmark = [pytest.mark.mu_mimo_performance_tests, pytest.mark.vlan, pytest.mark.wpa2_personal]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"open": [
|
||||
{"ssid_name": "mu-mimo-5g", "appliedRadios": ["5G"], "vlan":100},
|
||||
{"ssid_name": "mu-mimo-2g", "appliedRadios": ["2G"], "vlan":100}
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan":100},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan":100}
|
||||
]
|
||||
},
|
||||
"rf": [],
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("performance")
|
||||
@allure.feature("VLAN MODE open security and Downlink MU_MIMO Test")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Downlink MU_MIMO Tests")
|
||||
@allure.suite("Open Security")
|
||||
@allure.sub_suite("VLAN Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestMuMimoVlan(object):
|
||||
class TestMuMimoNat(object):
|
||||
"""
|
||||
Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m downlink_mu_mimo and vlan
|
||||
pytest -m mu_mimo_performance_tests and vlan
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.open
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_open_vlan_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
@allure.title("Test for Downlink MU-MIMO")
|
||||
def test_mu_mimo_open_vlan_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m downlink_mu_mimo and vlan and open and fiveg
|
||||
pytest -m mu_mimo_performance_tests and vlan and open and fiveg
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = "[BLANK]"
|
||||
security = "open"
|
||||
band = "fiveg"
|
||||
mode = "VLAN"
|
||||
vlan = 1
|
||||
vlan = [100]
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
@@ -73,68 +79,19 @@ class TestMuMimoVlan(object):
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=True,
|
||||
skip_5g=False)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, test="mu_mimo",
|
||||
ssid_name=ssid_name, security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, sniff_packets=False,
|
||||
tr398v2=False, tr398=True)
|
||||
if result:
|
||||
assert True
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.open
|
||||
@pytest.mark.twog
|
||||
def test_mu_mimo_open_vlan_2g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
"""
|
||||
Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m downlink_mu_mimo and vlan and open and twog
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "VLAN"
|
||||
vlan = 1
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=False,
|
||||
skip_5g=True)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
assert True
|
||||
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
"""
|
||||
|
||||
Performance Test: Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m "downlink_mu_mimo and bridge and wpa2_personal"
|
||||
pytest -m "mu_mimo_performance_tests and bridge and wpa2_personal"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.downlink_mu_mimo, pytest.mark.bridge, pytest.mark.wpa2_personal]
|
||||
pytestmark = [pytest.mark.mu_mimo_performance_tests, pytest.mark.bridge, pytest.mark.wpa2_personal]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "mu-mimo-wpa2-5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "mu-mimo-wpa2-2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"rf": {
|
||||
@@ -33,37 +33,43 @@ setup_params_general = {
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("performance")
|
||||
@allure.feature("BRIDGE MODE wpa2_personal security and Downlink MU_MIMO Test")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Downlink MU_MIMO Tests")
|
||||
@allure.suite("WPA2 Personal Security")
|
||||
@allure.sub_suite("Bridge Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestMuMimoBridge(object):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge
|
||||
pytest -m mu_mimo_performance_tests and bridge
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_wpa2_personal_bridge_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
@allure.title("Test for Downlink MU-MIMO")
|
||||
def test_mu_mimo_wpa2_personal_bridge_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge and wpa2_personal and fiveg
|
||||
pytest -m mu_mimo_performance_tests and bridge and wpa2_personal and fiveg
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
@@ -84,73 +90,19 @@ class TestMuMimoBridge(object):
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=True,
|
||||
skip_5g=False)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
assert True
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
def test_mu_mimo_wpa2_personal_bridge_2g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge and wpa2_personal and twog
|
||||
"""
|
||||
print('lf tool')
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
print(port)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g,
|
||||
skip_2g=False,
|
||||
skip_5g=True)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, test="mu_mimo",
|
||||
ssid_name=ssid_name, security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, sniff_packets=False,
|
||||
tr398v2=False, tr398=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@@ -1,109 +1,65 @@
|
||||
"""
|
||||
|
||||
Performance Test: Downlink MU-MIMO Test: NAT Mode
|
||||
pytest -m "downlink_mu_mimo and nat and wpa2_personal and fiveg"
|
||||
pytest -m "mu_mimo_performance_tests and nat and wpa2_personal"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.downlink_mu_mimo, pytest.mark.nat, pytest.mark.wpa2_personal]
|
||||
pytestmark = [pytest.mark.mu_mimo_performance_tests, pytest.mark.nat, pytest.mark.wpa2_personal]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "mu-mimo-5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "mu-mimo-2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"rf": [],
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("performance")
|
||||
@allure.feature("NAT MODE wpa2_personal security and Downlink MU_MIMO Test")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Downlink MU_MIMO Tests")
|
||||
@allure.suite("WPA2 Personal Security")
|
||||
@allure.sub_suite("NAT Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestMuMimoNat(object):
|
||||
"""
|
||||
Downlink MU-MIMO Test: nat Mode
|
||||
pytest -m downlink_mu_mimo and nat
|
||||
pytest -m mu_mimo_performance_tests and nat
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_wpa2_personal_nat_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
"""
|
||||
Downlink MU-MIMO Test: nat Mode
|
||||
pytest -m downlink_mu_mimo and nat and wpa2_personal and fiveg
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "NAT"
|
||||
vlan = 1
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=True,
|
||||
skip_5g=False)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
assert True
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
def test_mu_mimo_wpa2_personal_nat_2g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
@allure.title("Test for Downlink MU-MIMO")
|
||||
def test_mu_mimo_wpa2_personal_nat_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Nat Mode
|
||||
pytest -m downlink_mu_mimo and nat and wpa2_personal and twog
|
||||
pytest -m mu_mimo_performance_tests and nat and wpa2_personal and fiveg
|
||||
"""
|
||||
print('lf tool')
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "NAT"
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT-WAN"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
@@ -117,7 +73,6 @@ class TestMuMimoNat(object):
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
print(port)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
@@ -125,21 +80,19 @@ class TestMuMimoNat(object):
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g,
|
||||
skip_2g=False,
|
||||
skip_5g=True)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, test="mu_mimo",
|
||||
ssid_name=ssid_name, security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, sniff_packets=False,
|
||||
tr398v2=False, tr398=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@@ -1,58 +1,64 @@
|
||||
"""
|
||||
|
||||
Performance Test: Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m "downlink_mu_mimo and vlan and wpa2_personal"
|
||||
pytest -m "mu_mimo_performance_tests and vlan and wpa2_personal"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.downlink_mu_mimo, pytest.mark.vlan, pytest.mark.wpa2_personal]
|
||||
pytestmark = [pytest.mark.mu_mimo_performance_tests, pytest.mark.vlan, pytest.mark.wpa2_personal]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "mu-mimo-5g", "appliedRadios": ["5G"], "security_key": "something", "vlan":100},
|
||||
{"ssid_name": "mu-mimo-2g", "appliedRadios": ["2G"], "security_key": "something", "vlan":100}
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan":100},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan":100}
|
||||
]
|
||||
},
|
||||
"rf": [],
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("performance")
|
||||
@allure.feature("VLAN MODE wpa2_personal security and Downlink MU_MIMO Test")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Downlink MU_MIMO Tests")
|
||||
@allure.suite("WPA2 Personal Security")
|
||||
@allure.sub_suite("VLAN Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestMuMimoNat(object):
|
||||
"""
|
||||
Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m downlink_mu_mimo and vlan
|
||||
pytest -m mu_mimo_performance_tests and vlan
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_wpa2_personal_vlan_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
@allure.title("Test for Downlink MU-MIMO")
|
||||
def test_mu_mimo_wpa2_personal_vlan_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m downlink_mu_mimo and vlan and wpa2_personal and fiveg
|
||||
pytest -m mu_mimo_performance_tests and vlan and wpa2_personal and fiveg
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
band = "fiveg"
|
||||
mode = "VLAN"
|
||||
vlan = 1
|
||||
vlan = [100]
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
@@ -73,73 +79,19 @@ class TestMuMimoNat(object):
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=True,
|
||||
skip_5g=False)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
assert True
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
def test_mu_mimo_wpa2_personal_nat_2g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and nat and wpa2_personal and twog
|
||||
"""
|
||||
print('lf tool')
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "VLAN"
|
||||
vlan = 1
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
print(port)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g,
|
||||
skip_2g=False,
|
||||
skip_5g=True)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, test="mu_mimo",
|
||||
ssid_name=ssid_name, security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, sniff_packets=False,
|
||||
tr398v2=False, tr398=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
"""
|
||||
|
||||
Performance Test: Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m "downlink_mu_mimo and bridge and wpa3_personal"
|
||||
pytest -m "mu_mimo_performance_tests and bridge and wpa3_personal"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.downlink_mu_mimo, pytest.mark.bridge, pytest.mark.wpa3_personal]
|
||||
pytestmark = [pytest.mark.mu_mimo_performance_tests, pytest.mark.bridge, pytest.mark.wpa3_personal]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa3_personal": [
|
||||
{"ssid_name": "mu-mimo-wpa3-5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "mu-mimo-wpa3-2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"rf": {
|
||||
@@ -33,37 +33,43 @@ setup_params_general = {
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("performance")
|
||||
@allure.feature("BRIDGE MODE wpa3_personal security and Downlink MU_MIMO Test")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Downlink MU_MIMO Tests")
|
||||
@allure.suite("WPA3 Personal Security")
|
||||
@allure.sub_suite("Bridge Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestMuMimoBridge(object):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge
|
||||
pytest -m mu_mimo_performance_tests and bridge
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_wpa3_personal_bridge_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
@allure.title("Test for Downlink MU-MIMO")
|
||||
def test_mu_mimo_wpa3_personal_bridge_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge and wpa3_personal and fiveg
|
||||
pytest -m mu_mimo_performance_tests and bridge and wpa3_personal and fiveg
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
@@ -84,73 +90,19 @@ class TestMuMimoBridge(object):
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=True,
|
||||
skip_5g=False)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
assert True
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.twog
|
||||
def test_mu_mimo_wpa3_personal_bridge_2g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge and wpa3_personal and twog
|
||||
"""
|
||||
print('lf tool')
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
print(port)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g,
|
||||
skip_2g=False,
|
||||
skip_5g=True)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, test="mu_mimo",
|
||||
ssid_name=ssid_name, security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, sniff_packets=False,
|
||||
tr398v2=False, tr398=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@@ -1,58 +1,65 @@
|
||||
"""
|
||||
|
||||
Performance Test: Downlink MU-MIMO Test: NAT Mode
|
||||
pytest -m "downlink_mu_mimo and nat and wpa3_personal and fiveg"
|
||||
pytest -m "mu_mimo_performance_tests and nat and wpa3_personal"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.downlink_mu_mimo, pytest.mark.nat, pytest.mark.wpa3_personal]
|
||||
pytestmark = [pytest.mark.mu_mimo_performance_tests, pytest.mark.nat, pytest.mark.wpa3_personal]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"wpa3_personal": [
|
||||
{"ssid_name": "mu-mimo-5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "mu-mimo-2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"rf": [],
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("performance")
|
||||
@allure.feature("NAT MODE wpa3_personal security and Downlink MU_MIMO Test")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Downlink MU_MIMO Tests")
|
||||
@allure.suite("WPA Personal Security")
|
||||
@allure.sub_suite("NAT Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestMuMimoNat(object):
|
||||
"""
|
||||
Downlink MU-MIMO Test: NAT Mode
|
||||
pytest -m downlink_mu_mimo and nat
|
||||
Downlink MU-MIMO Test: nat Mode
|
||||
pytest -m mu_mimo_performance_tests and nat
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_wpa3_personal_nat_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
@allure.title("Test for Downlink MU-MIMO")
|
||||
def test_mu_mimo_wpa3_personal_nat_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Downlink MU-MIMO Test: NAT Mode
|
||||
pytest -m downlink_mu_mimo and nat and wpa3_personal and fiveg
|
||||
Downlink MU-MIMO Test: Nat Mode
|
||||
pytest -m mu_mimo_performance_tests and nat and wpa3_personal and fiveg
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "NAT"
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
mode = "NAT-WAN"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
@@ -73,73 +80,19 @@ class TestMuMimoNat(object):
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=True,
|
||||
skip_5g=False)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
assert True
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.twog
|
||||
def test_mu_mimo_wpa3_personal_nat_2g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge and wpa3_personal and twog
|
||||
"""
|
||||
print('lf tool')
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "NAT"
|
||||
vlan = 1
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
print(port)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g,
|
||||
skip_2g=False,
|
||||
skip_5g=True)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, test="mu_mimo",
|
||||
ssid_name=ssid_name, security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, sniff_packets=False,
|
||||
tr398v2=False, tr398=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@@ -1,58 +1,64 @@
|
||||
"""
|
||||
|
||||
Performance Test: Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m "downlink_mu_mimo and vlan and wpa3_personal and fiveg"
|
||||
pytest -m "mu_mimo_performance_tests and vlan and wpa3_personal"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.downlink_mu_mimo, pytest.mark.vlan, pytest.mark.wpa3_personal]
|
||||
pytestmark = [pytest.mark.mu_mimo_performance_tests, pytest.mark.vlan, pytest.mark.wpa3_personal]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa3_personal": [
|
||||
{"ssid_name": "mu-mimo-5g", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100},
|
||||
{"ssid_name": "mu-mimo-2g", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan":100},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan":100}
|
||||
]
|
||||
},
|
||||
"rf": [],
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("performance")
|
||||
@allure.feature("VLAN MODE wpa3_personal security and Downlink MU_MIMO Test")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Downlink MU_MIMO Tests")
|
||||
@allure.suite("WPA3 Personal Security")
|
||||
@allure.sub_suite("VLAN Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestMuMimoNat(object):
|
||||
"""
|
||||
Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m downlink_mu_mimo and vlan
|
||||
pytest -m mu_mimo_performance_tests and vlan
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_wpa3_personal_vlan_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
@allure.title("Test for Downlink MU-MIMO")
|
||||
def test_mu_mimo_wpa3_personal_vlan_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m downlink_mu_mimo and vlan and wpa3_personal and fiveg
|
||||
pytest -m mu_mimo_performance_tests and vlan and wpa3_personal and fiveg
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa3"
|
||||
band = "fiveg"
|
||||
mode = "VLAN"
|
||||
vlan = 1
|
||||
vlan = [100]
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
@@ -73,73 +79,19 @@ class TestMuMimoNat(object):
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=True,
|
||||
skip_5g=False)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
assert True
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.twog
|
||||
def test_mu_mimo_wpa3_personal_vlan_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Vlan Mode
|
||||
pytest -m downlink_mu_mimo and vlan and wpa3_personal and twog
|
||||
"""
|
||||
print('lf tool')
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "VLAN"
|
||||
vlan = 1
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
print(port)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g,
|
||||
skip_2g=False,
|
||||
skip_5g=True)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, test="mu_mimo",
|
||||
ssid_name=ssid_name, security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, sniff_packets=False,
|
||||
tr398v2=False, tr398=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
"""
|
||||
|
||||
Performance Test: Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m "downlink_mu_mimo and bridge and wpa_personal"
|
||||
pytest -m "mu_mimo_performance_tests and bridge and wpa_personal"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.downlink_mu_mimo, pytest.mark.bridge, pytest.mark.wpa_personal]
|
||||
pytestmark = [pytest.mark.mu_mimo_performance_tests, pytest.mark.bridge, pytest.mark.wpa_personal]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa_personal": [
|
||||
{"ssid_name": "mu-mimo-wpa-5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "mu-mimo-wpa-2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"rf": {
|
||||
@@ -33,37 +33,43 @@ setup_params_general = {
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("performance")
|
||||
@allure.feature("BRIDGE MODE wpa_personal security and Downlink MU_MIMO Test")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Downlink MU_MIMO Tests")
|
||||
@allure.suite("WPA Personal Security")
|
||||
@allure.sub_suite("Bridge Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestMuMimoBridge(object):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge
|
||||
pytest -m mu_mimo_performance_tests and bridge
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_wpa_personal_bridge_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
@allure.title("Test for Downlink MU-MIMO")
|
||||
def test_mu_mimo_wpa_personal_bridge_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge and wpa_personal and fiveg
|
||||
pytest -m mu_mimo_performance_tests and bridge and wpa_personal and fiveg
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
@@ -84,73 +90,19 @@ class TestMuMimoBridge(object):
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=True,
|
||||
skip_5g=False)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
assert True
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa3_personal
|
||||
@pytest.mark.twog
|
||||
def test_mu_mimo_wpa_personal_bridge_2g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge and wpa3_personal and twog
|
||||
"""
|
||||
print('lf tool')
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
print(port)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g,
|
||||
skip_2g=False,
|
||||
skip_5g=True)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, test="mu_mimo",
|
||||
ssid_name=ssid_name, security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, sniff_packets=False,
|
||||
tr398v2=False, tr398=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@@ -1,58 +1,65 @@
|
||||
"""
|
||||
|
||||
Performance Test: Downlink MU-MIMO Test: NAT Mode
|
||||
pytest -m "downlink_mu_mimo and Nat and wpa_personal"
|
||||
pytest -m "mu_mimo_performance_tests and nat and wpa_personal"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.downlink_mu_mimo, pytest.mark.nat, pytest.mark.wpa_personal]
|
||||
pytestmark = [pytest.mark.mu_mimo_performance_tests, pytest.mark.nat, pytest.mark.wpa_personal]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"wpa_personal": [
|
||||
{"ssid_name": "mu-mimo-5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "mu-mimo-2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"rf": [],
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("performance")
|
||||
@allure.feature("NAT MODE wpa_personal security and Downlink MU_MIMO Test")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Downlink MU_MIMO Tests")
|
||||
@allure.suite("WPA Personal Security")
|
||||
@allure.sub_suite("NAT Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestMuMimoNat(object):
|
||||
"""
|
||||
Downlink MU-MIMO Test: NAT Mode
|
||||
pytest -m downlink_mu_mimo and nat
|
||||
Downlink MU-MIMO Test: nat Mode
|
||||
pytest -m mu_mimo_performance_tests and nat
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_wpa_personal_nat_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
@allure.title("Test for Downlink MU-MIMO")
|
||||
def test_mu_mimo_wpa_personal_nat_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Downlink MU-MIMO Test: NAT Mode
|
||||
pytest -m downlink_mu_mimo and nat and wpa_personal and fiveg
|
||||
Downlink MU-MIMO Test: Nat Mode
|
||||
pytest -m mu_mimo_performance_tests and nat and wpa_personal and fiveg
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "NAT"
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
mode = "NAT-WAN"
|
||||
band = "fiveg"
|
||||
mode = "BRIDGE"
|
||||
vlan = 1
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
@@ -73,73 +80,20 @@ class TestMuMimoNat(object):
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=True,
|
||||
skip_5g=False)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, test="mu_mimo",
|
||||
ssid_name=ssid_name, security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, sniff_packets=False,
|
||||
tr398v2=False, tr398=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa_personal
|
||||
@pytest.mark.twog
|
||||
def test_mu_mimo_wpa_personal_nat_2g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and nat and wpa_personal and twog
|
||||
"""
|
||||
print('lf tool')
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "NAT"
|
||||
vlan = 1
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
print(port)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g,
|
||||
skip_2g=False,
|
||||
skip_5g=True)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
assert True
|
||||
@@ -1,58 +1,64 @@
|
||||
"""
|
||||
|
||||
Performance Test: Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m "downlink_mu_mimo and vlan and wpa_personal"
|
||||
pytest -m "mu_mimo_performance_tests and vlan and wpa_personal"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.downlink_mu_mimo, pytest.mark.vlan, pytest.mark.wpa_personal]
|
||||
pytestmark = [pytest.mark.mu_mimo_performance_tests, pytest.mark.vlan, pytest.mark.wpa_personal]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa_personal": [
|
||||
{"ssid_name": "mu-mimo-5g", "appliedRadios": ["5G"], "security_key": "something", "vlan":100},
|
||||
{"ssid_name": "mu-mimo-2g", "appliedRadios": ["2G"], "security_key": "something", "vlan":100}
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan":100},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan":100}
|
||||
]
|
||||
},
|
||||
"rf": [],
|
||||
"radius": False
|
||||
}
|
||||
|
||||
|
||||
@allure.suite("performance")
|
||||
@allure.feature("VLAN MODE wpa_personal security and Downlink MU_MIMO Test")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Downlink MU_MIMO Tests")
|
||||
@allure.suite("WPA Personal Security")
|
||||
@allure.sub_suite("VLAN Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestMuMimoNat(object):
|
||||
"""
|
||||
Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m downlink_mu_mimo and vlan
|
||||
pytest -m mu_mimo_performance_tests and vlan
|
||||
"""
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa_personal
|
||||
@pytest.mark.fiveg
|
||||
def test_mu_mimo_wpa_personal_vlan_5g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
@allure.title("Test for Downlink MU-MIMO")
|
||||
def test_mu_mimo_wpa_personal_vlan_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
Downlink MU-MIMO Test: VLAN Mode
|
||||
pytest -m downlink_mu_mimo and vlan and wpa_personal and fiveg
|
||||
pytest -m mu_mimo_performance_tests and vlan and wpa_personal and fiveg
|
||||
"""
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa"
|
||||
band = "fiveg"
|
||||
mode = "VLAN"
|
||||
vlan = 1
|
||||
vlan = [100]
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
@@ -73,73 +79,19 @@ class TestMuMimoNat(object):
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax, mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, skip_2g=True,
|
||||
skip_5g=False)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
assert True
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-6849",
|
||||
name="WIFI-6849")
|
||||
@pytest.mark.wpa_personal
|
||||
@pytest.mark.twog
|
||||
def test_mu_mimo_wpa_personal_vlan_2g(self, lf_tools, lf_test, create_lanforge_chamberview_dut):
|
||||
"""
|
||||
Downlink MU-MIMO Test: Bridge Mode
|
||||
pytest -m downlink_mu_mimo and bridge and wpa3_personal and twog
|
||||
"""
|
||||
print('lf tool')
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
mode = "VLAN"
|
||||
vlan = 1
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = lf_tools.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
print(port)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
|
||||
print(lf_tools.dut_idx_mapping)
|
||||
for i in lf_tools.dut_idx_mapping:
|
||||
if lf_tools.dut_idx_mapping[i][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (1)'
|
||||
print(dut_5g)
|
||||
if lf_tools.dut_idx_mapping[i][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + lf_tools.dut_idx_mapping[i][0] + ' ' + lf_tools.dut_idx_mapping[i][
|
||||
4] + ' (2)'
|
||||
print(dut_2g)
|
||||
mimo_obj = lf_test.downlink_mu_mimo(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
mode=mode,
|
||||
vlan_id=vlan, dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g,
|
||||
skip_2g=False,
|
||||
skip_5g=True)
|
||||
report_name = mimo_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Downlink MU-MIMO Test")
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, test="mu_mimo",
|
||||
ssid_name=ssid_name, security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, sniff_packets=False,
|
||||
tr398v2=False, tr398=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@@ -37,7 +37,7 @@ class TestMultiAssoDisassoBridge(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5691", name="WIFI-5691")
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.udp_upload_2g
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP upload 2.4G")
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP (NSS-2) upload 2.4G")
|
||||
def test_multi_asso_disasso_udp_upload_nss2_2g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "multi_assoc_disassoc_tests and wpa2_personal and bridge and twog and udp_upload_2g"
|
||||
@@ -55,7 +55,7 @@ class TestMultiAssoDisassoBridge(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5692", name="WIFI-5692")
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.udp_download_2g
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP download 2.4G")
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP (NSS-2) download 2.4G")
|
||||
def test_multi_asso_disasso_udp_download_nss2_2g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "multi_assoc_disassoc_tests and wpa2_personal and bridge and twog and udp_download_2g"
|
||||
@@ -74,7 +74,7 @@ class TestMultiAssoDisassoBridge(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5693", name="WIFI-5693")
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.udp_upload_5g
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP upload 5G")
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP (NSS-2) upload 5G")
|
||||
def test_multi_asso_disasso_udp_upload_nss2_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "multi_assoc_disassoc_tests and wpa2_personal and bridge and fiveg and udp_upload_5g"
|
||||
@@ -93,7 +93,7 @@ class TestMultiAssoDisassoBridge(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5694", name="WIFI-5694")
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.udp_download_5g
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP download 5G")
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP (NSS-2) download 5G")
|
||||
def test_multi_asso_disasso_udp_download_nss2_5g(self, get_test_library, setup_configuration,check_connectivity):
|
||||
"""
|
||||
pytest -m "multi_assoc_disassoc_tests and wpa2_personal and bridge and fiveg and udp_download_5g"
|
||||
@@ -108,5 +108,3 @@ class TestMultiAssoDisassoBridge(object):
|
||||
assert True
|
||||
else:
|
||||
assert False, discription
|
||||
|
||||
|
||||
|
||||
@@ -37,12 +37,12 @@ class TestMultiAssoDisassoNat(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5848", name="WIFI-5848")
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.udp_upload_2g
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP upload 2.4G")
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP (NSS-2) upload 2.4G")
|
||||
def test_multi_asso_disasso_NAT_udp_upload_nss2_2g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "multi_assoc_disassoc_tests and wpa2_personal and nat and twog and udp_upload_2g"
|
||||
"""
|
||||
mode = "NAT"
|
||||
mode = "NAT-WAN"
|
||||
vlan = 1
|
||||
result, discription = get_test_library.multi_asso_disasso(band="2G", num_stations=16, dut_data=setup_configuration,
|
||||
mode = mode, vlan=vlan, instance_name="udp_upload_2g",
|
||||
@@ -55,12 +55,12 @@ class TestMultiAssoDisassoNat(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5870", name="WIFI-5870")
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.udp_download_2g
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP download 2.4G")
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP (NSS-2) download 2.4G")
|
||||
def test_multi_asso_disasso_NAT_udp_download_nss2_2g(self, get_test_library, setup_configuration):
|
||||
"""
|
||||
pytest -m "multi_assoc_disassoc_tests and wpa2_personal and nat and twog and udp_download_2g"
|
||||
"""
|
||||
mode = "NAT"
|
||||
mode = "NAT-WAN"
|
||||
vlan = 1
|
||||
result, discription = get_test_library.multi_asso_disasso(band="2G", num_stations=16,
|
||||
dut_data=setup_configuration,
|
||||
@@ -74,12 +74,12 @@ class TestMultiAssoDisassoNat(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5871", name="WIFI-5871")
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.udp_upload_5g
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP upload 5G")
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP (NSS-2) upload 5G")
|
||||
def test_multi_asso_disasso_NAT_udp_upload_nss2_5g(self, get_test_library, setup_configuration):
|
||||
"""
|
||||
pytest -m "multi_assoc_disassoc_tests and wpa2_personal and nat and fiveg and udp_upload_5g"
|
||||
"""
|
||||
mode = "NAT"
|
||||
mode = "NAT-WAN"
|
||||
vlan = 1
|
||||
result, discription = get_test_library.multi_asso_disasso(band="5G", num_stations=16,
|
||||
dut_data=setup_configuration,
|
||||
@@ -93,12 +93,12 @@ class TestMultiAssoDisassoNat(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5872", name="WIFI-5872")
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.udp_download_5g
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP download 5G")
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP (NSS-2) download 5G")
|
||||
def test_multi_asso_disasso_NAT_udp_download_nss2_5g(self, get_test_library, setup_configuration):
|
||||
"""
|
||||
pytest -m "multi_assoc_disassoc_tests and wpa2_personal and nat and fiveg and udp_download_5g"
|
||||
"""
|
||||
mode = "NAT"
|
||||
mode = "NAT-WAN"
|
||||
vlan = 1
|
||||
result, discription = get_test_library.multi_asso_disasso(band="5G", num_stations=16,
|
||||
dut_data=setup_configuration,
|
||||
|
||||
@@ -37,13 +37,13 @@ class TestMultiAssoDisassoVlan(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5873", name="WIFI-5873")
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.udp_upload_2g
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP upload 2.4G")
|
||||
def test_multi_asso_disasso_VLAN_udp_upload_2g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP (NSS-2) upload 2.4G")
|
||||
def test_multi_asso_disasso_VLAN_udp_upload_nss2_2g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "multi_assoc_disassoc_tests and wpa2_personal and vlan and twog and udp_upload_2g"
|
||||
"""
|
||||
mode = "VLAN"
|
||||
vlan = 100
|
||||
vlan = [100]
|
||||
result, discription = get_test_library.multi_asso_disasso(band="2G", num_stations=16, dut_data=setup_configuration,
|
||||
mode=mode, vlan=vlan, instance_name="udp_upload_2g",
|
||||
traffic_direction="upload", traffic_rate="4Mbps")
|
||||
@@ -55,13 +55,13 @@ class TestMultiAssoDisassoVlan(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5874", name="WIFI-5874")
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.udp_download_2g
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP download 2.4G")
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP (NSS-2) download 2.4G")
|
||||
def test_multi_asso_disasso_VLAN_udp_download_nss2_2g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "multi_assoc_disassoc_tests and wpa2_personal and vlan and twog and udp_download_2g"
|
||||
"""
|
||||
mode = "VLAN"
|
||||
vlan = 1
|
||||
vlan = [100]
|
||||
result, discription = get_test_library.multi_asso_disasso(band="2G", num_stations=16,
|
||||
dut_data=setup_configuration,
|
||||
mode=mode, vlan=vlan, instance_name="udp_download_2g",
|
||||
@@ -74,13 +74,13 @@ class TestMultiAssoDisassoVlan(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5875", name="WIFI-5875")
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.udp_upload_5g
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP upload 5G")
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP (NSS-2) upload 5G")
|
||||
def test_multi_asso_disasso_VLAN_udp_upload_nss2_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "multi_assoc_disassoc_tests and wpa2_personal and vlan and fiveg and udp_upload_5g"
|
||||
"""
|
||||
mode = "VLAN"
|
||||
vlan = 1
|
||||
vlan = [100]
|
||||
result, discription = get_test_library.multi_asso_disasso(band="5G", num_stations=16,
|
||||
dut_data=setup_configuration,
|
||||
mode=mode, vlan=vlan, instance_name="udp_upload_5g",
|
||||
@@ -93,13 +93,13 @@ class TestMultiAssoDisassoVlan(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5876", name="WIFI-5876")
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.udp_download_5g
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP download 5G")
|
||||
@allure.title("Test for Multi Association and Disassociation for UDP (NSS-2) download 5G")
|
||||
def test_multi_asso_disasso_VLAN_udp_download_nss2_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "multi_assoc_disassoc_tests and wpa2_personal and vlan and fiveg and udp_download_5g"
|
||||
"""
|
||||
mode = "VLAN"
|
||||
vlan = 1
|
||||
vlan = [100]
|
||||
result, discription = get_test_library.multi_asso_disasso(band="5G", num_stations=16,
|
||||
dut_data=setup_configuration,
|
||||
mode=mode, vlan=vlan, instance_name="udp_download_5g",
|
||||
@@ -108,5 +108,3 @@ class TestMultiAssoDisassoVlan(object):
|
||||
assert True
|
||||
else:
|
||||
assert False, discription
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
"""
|
||||
|
||||
Test Rate v/s Orientation : Bridge Mode
|
||||
pytest -m "rate_vs_orientation_tests"
|
||||
"""
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import pytest
|
||||
import allure
|
||||
import os.path
|
||||
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.ratevsorientation, pytest.mark.bridge]
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.rate_vs_orientation_tests, pytest.mark.bridge, pytest.mark.wpa2_personal]
|
||||
|
||||
|
||||
setup_params_general = {
|
||||
@@ -19,6 +25,9 @@ setup_params_general = {
|
||||
"radius": False
|
||||
}
|
||||
@allure.feature("BRIDGE MODE RATE VS ORIENTATION")
|
||||
@allure.parent_suite("RATE VS ORIENTATION")
|
||||
@allure.suite(suite_name="BRIDGE MODE")
|
||||
@allure.sub_suite(sub_suite_name="WPA2_personal RATE VS ORIENTATION")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
@@ -26,46 +35,145 @@ setup_params_general = {
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestRatevsOrientationBridge(object):
|
||||
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
class TestRateVsOrientationBridge(object):
|
||||
"""
|
||||
Bridge Mode : Test Rate v/s Orientation
|
||||
pytest -m "rate_vs_orientation_tests and wpa2_personal and bridge"
|
||||
"""
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
@allure.title("Bridge Mode Rate vs Orientation Test (NSS-2) 5 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5431", name="WIFI-5431")
|
||||
def test_client_wpa2_personal_5g_11ac(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
get_configuration, lf_tools):
|
||||
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
def test_rvo_tcp_dl_nss2_wpa2_personal_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "rate_vs_orientation_tests and wpa2_personal and bridge and fiveg"
|
||||
"""
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
print("station", station)
|
||||
ser_no = lf_test.attenuator_serial()
|
||||
print(ser_no)
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
radios = get_test_library.wave2_5g_radios
|
||||
# station = {'1.1.ath10k_5g00': {'4way time (us)': 0, 'channel': '149', 'cx time (us)': 0, 'dhcp (ms)': 1540, 'ip': '172.16.230.16', 'signal': '-41 dBm'}}
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security, passkey=security_key, mode=mode,
|
||||
band=band, num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial_radio(ssid=ssid_name, passkey=security_key, security=security,
|
||||
radio=radios[0], station_name=['sta0000'])
|
||||
# ser_no = ['1.1.3022', '1.1.3025']
|
||||
logging.info(f"Attenuators - {ser_no}")
|
||||
val = [['modes: 802.11an-AC'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||
['bandw_options: 80'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])],
|
||||
['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 0..+50..800'], ['attenuations2: 0..+50..800'],['chamber: DUT-Chamber'], ['tt_deg: 0..+30..359']]
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])],
|
||||
['attenuator2: ' + '0'], ['attenuations: 100'],
|
||||
['chamber: DUT-Chamber'], ['tt_deg: 0..+30..359']] #210..+30..540 #0..+30..359
|
||||
|
||||
if station:
|
||||
time.sleep(3)
|
||||
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||
instance_name="ORIENTATION_RVR_BRIDGE_11_AC",
|
||||
rvr_o, report_name = get_test_library.rate_vs_range_test(station_name=list(station.keys())[0], mode=mode,
|
||||
instance_name="ORIENTATION_RVR_BRIDGE_11_AC", download_rate="100%",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
# report_name = rvr_o[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
assert station
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong":500}
|
||||
atn, deg = [10], [0,30,60,90,120,150,180,210,240,270,300,330] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
logging.info(f"kpi-csv value- {kpi_val}")
|
||||
# allure.attach.file(source="../reports/" + report_name + "/" + kpi, name="kpi.csv")
|
||||
if str(kpi_val) == "empty":
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
assert False
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
logging.info(f"Throughtput-value - {thrpt_val}\nPass-fail - {pass_fail}")
|
||||
get_test_library.allure_report_table_format(dict_data=thrpt_val, key="attenuation-orientation",
|
||||
value="Throughput values", name="Test_results")
|
||||
if "FAIL" in pass_fail:
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
assert True
|
||||
else:
|
||||
assert False, "CSV file does not exist"
|
||||
else:
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
@allure.title("Bridge Mode Rate vs Orientation Test (NSS-2) 2.4 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5431", name="WIFI-5431")
|
||||
def test_client_tcp_dl_nss2_wpa2_personal_2g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "rate_vs_orientation_tests and wpa2_personal and bridge and twog"
|
||||
"""
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True, clear_all_sta=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
radios = get_test_library.wave2_2g_radios
|
||||
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security, passkey=security_key, mode=mode,
|
||||
band=band, num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial_radio(ssid=ssid_name, passkey=security_key, security=security,
|
||||
radio=radios[0], station_name=['sta0000'])
|
||||
# ser_no = get_test_library.attenuator_serial()
|
||||
logging.info(f"Attenuators - {ser_no}")
|
||||
val = [['modes: 802.11bgn-AC'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])],
|
||||
['attenuator2: ' + '0'], ['attenuations: 100'],
|
||||
['chamber: DUT-Chamber'], ['tt_deg: 0..+30..359']] # 210..+30..540 #0..+30..359
|
||||
|
||||
if station:
|
||||
rvr_o, report_name = get_test_library.rate_vs_range_test(station_name=list(station.keys())[0], mode=mode,
|
||||
instance_name="ORIENTATION_RVR_BRIDGE_11_AC", download_rate="100%",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
# report_name = rvr_o[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 90}
|
||||
atn, deg = [10], [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
logging.info(f"kpi-csv value- {kpi_val}")
|
||||
# allure.attach.file(source="../reports/" + report_name + "/" + kpi, name="kpi.csv")
|
||||
if str(kpi_val) == "empty":
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
logging.info(f"Throughtput-value - {thrpt_val}\nPass-fail - {pass_fail}")
|
||||
get_test_library.allure_report_table_format(dict_data=thrpt_val, key="attenuation-orientation",
|
||||
value="Throughput values", name="Test_results")
|
||||
if "FAIL" in pass_fail:
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
assert True
|
||||
else:
|
||||
assert False, "CSV file does not exist"
|
||||
else:
|
||||
assert False, "Test failed due to no station ip"
|
||||
@@ -0,0 +1,180 @@
|
||||
"""
|
||||
|
||||
Test Rate v/s Orientation : Nat Mode
|
||||
pytest -m "rate_vs_orientation_tests"
|
||||
"""
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import pytest
|
||||
import allure
|
||||
import os.path
|
||||
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.rate_vs_orientation_tests, pytest.mark.nat, pytest.mark.wpa2_personal]
|
||||
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@allure.feature("NAT MODE RATE VS ORIENTATION")
|
||||
@allure.parent_suite("RATE VS ORIENTATION")
|
||||
@allure.suite(suite_name="NAT MODE")
|
||||
@allure.sub_suite(sub_suite_name="WPA2_personal RATE VS ORIENTATION")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestRateVsOrientationNat(object):
|
||||
"""
|
||||
Nat Mode : Test Rate v/s Orientation
|
||||
pytest -m "rate_vs_orientation_tests and wpa2_personal and nat"
|
||||
"""
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
@allure.title("Nat Mode Rate vs Orientation Test 5 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5431", name="WIFI-5431")
|
||||
def test_rvo_tcp_dl_nss2_wpa2_personal_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "rate_vs_orientation_tests and wpa2_personal and nat and fiveg"
|
||||
"""
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT-WAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security, passkey=security_key, mode=mode,
|
||||
band=band, num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
# station = {'1.1.ath10k_5g00': {'4way time (us)': 875, 'channel': '149', 'cx time (us)': 133934, 'dhcp (ms)': 7468, 'ip': '192.168.34.86', 'signal': '-41 dBm'}}
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
logging.info(f"Attenuators - {ser_no}")
|
||||
val = [['modes: 802.11an-AC'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||
['bandw_options: 80'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])],
|
||||
['attenuator2: ' + str(ser_no[1])], ['attenuations: 100'],
|
||||
['attenuations2: 100'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+30..359']] #210..+30..540 #0..+30..359
|
||||
|
||||
if station:
|
||||
rvr_o, report_name = get_test_library.rate_vs_range_test(station_name=list(station.keys())[0], mode=mode,
|
||||
instance_name="ORIENTATION_RVR_NAT_11_AC",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
# report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
# entries = ['canvil.ico', 'kpi.csv', 'chart-2-print.png', 'text-csv-3.csv', 'kpi-chart-3-print.png', 'text-tab-0.csv', 'report.css', 'chart-8.png', 'chart-5.png', 'chart-6.png', 'text-tab-2.csv', 'index.html', 'custom.css', 'index-print.html', 'chart-7.png', 'chart-7-print.png', 'chart-2.png', 'rate-vs-range-vs-orientation-report-2022-12-16-01-34-17.pdf', 'text-tab-3.csv', 'text-tab-1.csv', 'logo.png', 'chart-8-print.png', 'report_banner-1000x205.jpg', 'text-csv-0.csv', 'kpi-chart-0.png', 'chart-4.png', 'chart-1-print.png', 'chart-5-print.png', 'text-csv-1.csv', 'text-csv-2.csv', 'chart-1.png', 'csv-data', 'CenturyGothic.woff', 'kpi-chart-3.png', 'CandelaLogo2-90dpi-200x90-trans.png', 'chart-4-print.png', 'chart-6-print.png', 'kpi-chart-0-print.png', 'candela_swirl_small-72h.png']
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong":500}
|
||||
atn, deg = [10], [0,30,60,90,120,150,180,210,240,270,300,330] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
# kpi_val = [[93.856416], [92.763538], [93.591643], [93.601009], [93.510303], [92.895905], [93.438518], [93.060875], [93.697596], [92.740075], [93.005289], [93.113691]]
|
||||
logging.info(f"kpi-csv value- {kpi_val}")
|
||||
# allure.attach.file(source="../reports/" + report_name + "/" + kpi, name="kpi.csv")
|
||||
if str(kpi_val) == "empty":
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
logging.info(f"Throughtput-value - {thrpt_val}\nPass-fail - {pass_fail}")
|
||||
# thrpt_val = {'10atn-0deg': 93.856416, '10atn-30deg': 92.763538, '10atn-60deg': 93.591643, '10atn-90deg': 93.601009, '10atn-120deg': 93.510303, '10atn-150deg': 92.895905, '10atn-180deg': 93.438518, '10atn-210deg': 93.060875, '10atn-240deg': 93.697596, '10atn-270deg': 92.740075, '10atn-300deg': 93.005289, '10atn-330deg': 93.113691}
|
||||
# pass_fail = ['FAIL', 'FAIL', 'FAIL', 'FAIL', 'FAIL', 'FAIL', 'FAIL', 'FAIL', 'FAIL', 'FAIL', 'FAIL', 'FAIL']
|
||||
get_test_library.allure_report_table_format(dict_data=thrpt_val, key="attenuation-orientation",
|
||||
value="Throughput values", name="Test_results")
|
||||
if "FAIL" in pass_fail:
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
assert True
|
||||
else:
|
||||
assert False, "CSV file does not exist"
|
||||
else:
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
@allure.title("Nat Mode Rate vs Orientation Test 2.4 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5431", name="WIFI-5431")
|
||||
def test_client_tcp_dl_nss2_wpa2_personal_2g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "rate_vs_orientation_tests and wpa2_personal and nat and twog"
|
||||
"""
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT-WAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security, passkey=security_key, mode=mode,
|
||||
band=band, num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
val = [['modes: 802.11bgn-AC'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||
['bandw_options: 80'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])],
|
||||
['attenuator2: ' + str(ser_no[1])], ['attenuations: 100'],
|
||||
['attenuations2: 100'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+30..359']] # 210..+30..540 #0..+30..359
|
||||
|
||||
if station:
|
||||
rvr_o, report_name = get_test_library.rate_vs_range_test(station_name=list(station.keys())[0], mode=mode,
|
||||
instance_name="ORIENTATION_RVR_NAT_11_AC",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
# report_name = rvr_o[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 90}
|
||||
atn, deg = [10], [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
logging.info(f"kpi-csv value- {kpi_val}")
|
||||
# allure.attach.file(source="../reports/" + report_name + "/" + kpi, name="kpi.csv")
|
||||
if str(kpi_val) == "empty":
|
||||
print("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
logging.info(f"Throughtput-value - {thrpt_val}\nPass-fail - {pass_fail}")
|
||||
get_test_library.allure_report_table_format(dict_data=thrpt_val, key="attenuation-orientation",
|
||||
value="Throughput values", name="Test_results")
|
||||
if "FAIL" in pass_fail:
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
assert True
|
||||
else:
|
||||
assert False, "CSV file does not exist"
|
||||
else:
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
"""
|
||||
|
||||
Test Rate v/s Orientation : Vlan Mode
|
||||
pytest -m "rate_vs_orientation_tests"
|
||||
"""
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import pytest
|
||||
import allure
|
||||
import os.path
|
||||
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.rate_vs_orientation_tests, pytest.mark.vlan, pytest.mark.wpa2_personal]
|
||||
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan":100},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan":100}
|
||||
]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
@allure.feature("VLAN MODE RATE VS ORIENTATION")
|
||||
@allure.parent_suite("RATE VS ORIENTATION")
|
||||
@allure.suite(suite_name="VLAN MODE")
|
||||
@allure.sub_suite(sub_suite_name="WPA2_personal RATE VS ORIENTATION")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestRateVsOrientationVlan(object):
|
||||
"""
|
||||
Vlan Mode : Test Rate v/s Orientation
|
||||
pytest -m "rate_vs_orientation_tests and wpa2_personal and vlan"
|
||||
"""
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
@allure.title("Vlan Mode Rate vs Orientation Test 5 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5431", name="WIFI-5431")
|
||||
def test_rvo_tcp_dl_nss2_wpa2_personal_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "rate_vs_orientation_tests and wpa2_personal and vlan and fiveg"
|
||||
"""
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = [100]
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security, passkey=security_key, mode=mode,
|
||||
band=band, num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
logging.info(f"Attenuators - {ser_no}")
|
||||
val = [['modes: 802.11an-AC'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||
['bandw_options: 80'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])],
|
||||
['attenuator2: ' + str(ser_no[1])], ['attenuations: 100'],
|
||||
['attenuations2: 100'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+30..359']] #210..+30..540 #0..+30..359
|
||||
|
||||
if station:
|
||||
rvr_o, report_name = get_test_library.rate_vs_range_test(station_name=list(station.keys())[0], mode=mode,
|
||||
instance_name="ORIENTATION_RVR_NAT_11_AC",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
# report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong":500}
|
||||
atn, deg = [10], [0,30,60,90,120,150,180,210,240,270,300,330] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
# allure.attach.file(source="../reports/" + report_name + "/" + kpi, name="kpi.csv")
|
||||
if str(kpi_val) == "empty":
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
logging.info(f"Throughtput-value - {thrpt_val}\nPass-fail - {pass_fail}")
|
||||
get_test_library.allure_report_table_format(dict_data=thrpt_val, key="attenuation-orientation",
|
||||
value="Throughput values", name="Test_results")
|
||||
if "FAIL" in pass_fail:
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
assert True
|
||||
else:
|
||||
assert False, "CSV file does not exist"
|
||||
else:
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
@allure.title("Vlan Mode Rate vs Orientation Test 2.4 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5431", name="WIFI-5431")
|
||||
def test_client_tcp_dl_nss2_wpa2_personal_2g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""
|
||||
pytest -m "rate_vs_orientation_tests and wpa2_personal and vlan and twog"
|
||||
"""
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = [100]
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security, passkey=security_key, mode=mode,
|
||||
band=band, num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
val = [['modes: 802.11bgn-AC'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||
['bandw_options: 80'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])],
|
||||
['attenuator2: ' + str(ser_no[1])], ['attenuations: 100'],
|
||||
['attenuations2: 100'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+30..359']] # 210..+30..540 #0..+30..359
|
||||
|
||||
if station:
|
||||
rvr_o, report_name = get_test_library.rate_vs_range_test(station_name=list(station.keys())[0], mode=mode,
|
||||
instance_name="ORIENTATION_RVR_VLAN_11_AC",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
# report_name = rvr_o[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 90}
|
||||
atn, deg = [10], [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
logging.info(f"kpi-csv value- {kpi_val}")
|
||||
# allure.attach.file(source="../reports/" + report_name + "/" + kpi, name="kpi.csv")
|
||||
if str(kpi_val) == "empty":
|
||||
print("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
logging.info(f"Throughtput-value - {thrpt_val}\nPass-fail - {pass_fail}")
|
||||
get_test_library.allure_report_table_format(dict_data=thrpt_val, key="attenuation-orientation",
|
||||
value="Throughput values", name="Test_results")
|
||||
if "FAIL" in pass_fail:
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
assert True
|
||||
else:
|
||||
assert False, "CSV file does not exist"
|
||||
else:
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
"""
|
||||
|
||||
Advanced Test: Rate v/s Range test under various combinations: Bridge Mode
|
||||
pytest -m "ratevsrange and bridge " -s -vvv --skip-testrail --testbed=basic-01 --alluredir=../allure_reports
|
||||
--> allure serve ../allure_reports/
|
||||
|
||||
|
||||
Test Rate v/s Range : Bridge Mode
|
||||
pytest -m "rate_vs_range"
|
||||
"""
|
||||
import os
|
||||
import time
|
||||
import pytest
|
||||
import allure
|
||||
import os.path
|
||||
import logging
|
||||
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.ratevsrange, pytest.mark.bridge]
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.rate_vs_range, pytest.mark.bridge]
|
||||
|
||||
|
||||
setup_params_general = {
|
||||
@@ -27,7 +25,10 @@ setup_params_general = {
|
||||
"radius": False
|
||||
}
|
||||
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||
@allure.feature("BRIDGE MODE RATE VS RANGE")
|
||||
@allure.parent_suite("RATE VS RANGE")
|
||||
@allure.suite(suite_name="BRIDGE MODE")
|
||||
@allure.sub_suite(sub_suite_name="WPA2_personal RATE VS RANGE")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
@@ -36,234 +37,173 @@ setup_params_general = {
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
@pytest.mark.Mhz20
|
||||
class TestRatevsRangeBridge(object):
|
||||
class Test_RatevsRange_Bridge(object):
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.client11b
|
||||
@pytest.mark.tarun2
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
@allure.title("Bridge Mode Rate vs Range Test 2.4 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2495", name="WIFI-2495")
|
||||
def test_client_wpa2_personal_2g_11b(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||
get_configuration, lf_tools):
|
||||
"""
|
||||
|
||||
pytest -m "ratevsrange and client11b" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
jira- wifi-2495
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
def test_rvr_bridge_wpa2_personal_2g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
print("station", station)
|
||||
|
||||
ser_no = lf_test.attenuator_serial()
|
||||
station_names_twog = get_test_library.twog_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,passkey=security_key, mode=mode,
|
||||
band=band, num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: 802.11b'], ['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:;TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
atn2 = ser_no[1].split(".")[2]
|
||||
print(f"antenuation-2 : {atn2}")
|
||||
# for i in range(4):
|
||||
# lf_test.attenuator_modify(int(atn2), i, 955)
|
||||
# time.sleep(0.5)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:;TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 0 100 210..+30..630'], ['attenuations2: 0 100 210..+30..630'], ['chamber: 0'], ['tt_deg: 0']]
|
||||
if station:
|
||||
time.sleep(3)
|
||||
rvr_o = lf_test.ratevsrange(station_name=station_names_twog, mode=mode,
|
||||
instance_name="MODEBRIDGE_RVR_11B_TWOG_modified",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_twog, mode=mode, download_rate="100%",
|
||||
duration='60000',instance_name="MODEBRIDGE_RVR_TWOG",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries",entries)
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
get_test_library.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||
assert station
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 100, "medium": 95, "weak": 14}
|
||||
atn = [0, 10, 21, 24, 27,30,33,36,39,42,45,48,51,54,57,60,63]
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
print("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
assert False
|
||||
# kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||
# print(str(kpi_val))
|
||||
# if str(kpi_val) == "empty":
|
||||
# print("kpi is empty, station did not got ip, Test failed")
|
||||
# allure.attach(name="Kpi Data", body="station did not got ip Test failed.")
|
||||
# assert False
|
||||
# else:
|
||||
# print("Test passed successfully")
|
||||
# allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.client11g
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2496", name="WIFI-2496")
|
||||
def test_client_wpa2_personal_2g_11g(self,
|
||||
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||
get_configuration, lf_tools):
|
||||
"""
|
||||
|
||||
pytest -m "ratevsrange and bridge and client11g" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
jira- wifi-2496
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
print("station", station)
|
||||
ser_no = lf_test.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: 802.11g'], ['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types: TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
if station:
|
||||
time.sleep(3)
|
||||
rvr_o = lf_test.ratevsrange(station_name=station_names_twog, mode=mode,
|
||||
instance_name="MODEBRIDGE_RVR_11G_TWOG_modified",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||
assert station
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
# count = 0
|
||||
direction = "DUT-TX"
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}--{direction}"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.client11a
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2497", name="WIFI-2497")
|
||||
def test_client_wpa2_personal_5g_11a(self,
|
||||
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
get_configuration,lf_tools):
|
||||
"""
|
||||
|
||||
pytest -m "ratevsrange and bridge and client11a" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
jira- wifi-2497
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
print("station", station)
|
||||
ser_no = lf_test.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: 802.11a'], ['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
if station:
|
||||
time.sleep(3)
|
||||
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||
instance_name="MODEBRIDGE_RVR_11A_FIVEG_modified",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
assert station
|
||||
pass_fail.append("FAIL")
|
||||
# count += 1
|
||||
direction = "DUT-RX"
|
||||
start += 7
|
||||
print(pass_fail,"\nThroughput value-->",thrpt_val)
|
||||
if "FAIL" in pass_fail:
|
||||
print("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.client11an
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2498", name="WIFI-2498")
|
||||
def test_client_wpa2_personal_5g_11an(self,
|
||||
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
get_configuration, lf_tools):
|
||||
"""
|
||||
|
||||
pytest -m "ratevsrange and bridge and client11an" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
jira- wifi-2498
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
print("station", station)
|
||||
ser_no = lf_test.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: 802.11an'], ['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
if station:
|
||||
time.sleep(3)
|
||||
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||
instance_name="MODEBRIDGE_RVR_11AN_FIVEG_modified",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
assert station
|
||||
print("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
print("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
print("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@pytest.mark.performance_advanced
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.client11ac
|
||||
@pytest.mark.tarun2
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
@allure.title("Bridge Mode Rate vs Range Test 5 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2499", name="WIFI-2499")
|
||||
def test_client_wpa2_personal_5g_11ac(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
get_configuration, lf_tools):
|
||||
"""
|
||||
|
||||
pytest -m "ratevsrange and bridge and client11ac" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
jira- wifi-2499
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
def test_rvr_bridge_wpa2_personal_5g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
station_names_fiveg = get_test_library.fiveg_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
print("station", station)
|
||||
ser_no = lf_test.attenuator_serial()
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
atn2 = ser_no[1].split(".")[2]
|
||||
print(f"antenuation-2 : {atn2}")
|
||||
# for i in range(4):
|
||||
# lf_test.attenuator_modify(int(atn2), i, 955)
|
||||
# time.sleep(0.5)
|
||||
val = [['modes: 802.11an-AC'], ['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 0..+50..950'],['attenuations2: 0..+50..950']]
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: '+ str(ser_no[1])],
|
||||
['attenuations: 0 100 210..+30..540'],['attenuations2: 0 100 210..+30..540'],['chamber: 0'], ['tt_deg: 0']]
|
||||
|
||||
if station:
|
||||
time.sleep(3)
|
||||
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||
instance_name="MODEBRIDGE_RVR_11AC_FIVEG_modified",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_fiveg, mode=mode,download_rate="100%",
|
||||
duration='60000',instance_name="MODEBRIDGE_RVR_FIVEG",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
assert station
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 560, "medium": 220, "weak": 5}
|
||||
atn = [0, 10, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54]
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
print("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
assert False
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
# count = 0
|
||||
direction = "DUT-TX"
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}--{direction}"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
# count += 1
|
||||
direction = "DUT-RX"
|
||||
start += 6
|
||||
print(pass_fail,"\nThroughput value-->",thrpt_val)
|
||||
if "FAIL" in pass_fail:
|
||||
print("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
print("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
print("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
print("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@@ -1,21 +1,16 @@
|
||||
"""
|
||||
|
||||
Advanced Test: Rate v/s Range test under various combinations: NAT Mode
|
||||
pytest -m "ratevsrange and NAT " -s -vvv --skip-testrail --testbed=basic-01 --alluredir=../allure_reports
|
||||
--> allure serve ../allure_reports/
|
||||
|
||||
|
||||
Test Rate v/s Range : Nat Mode
|
||||
pytest -m "rate_vs_range"
|
||||
"""
|
||||
import os
|
||||
import time
|
||||
|
||||
import pytest
|
||||
import allure
|
||||
import os.path
|
||||
import csv
|
||||
import pandas as pd
|
||||
import logging
|
||||
|
||||
# pytestmark = [pytest.mark.advance, pytest.mark.ratevsrange, pytest.mark.nat]
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.rate_vs_range, pytest.mark.nat]
|
||||
|
||||
|
||||
setup_params_general = {
|
||||
@@ -30,7 +25,10 @@ setup_params_general = {
|
||||
"radius": False
|
||||
}
|
||||
|
||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||
@allure.feature("NAT MODE RATE VS RANGE")
|
||||
@allure.parent_suite("RATE VS RANGE")
|
||||
@allure.suite(suite_name="NAT MODE")
|
||||
@allure.sub_suite(sub_suite_name="WPA2_personal RATE VS RANGE")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
@@ -38,303 +36,174 @@ setup_params_general = {
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestRatevsRangeNat(object):
|
||||
@pytest.mark.Mhz20
|
||||
class Test_RatevsRange_Bridge(object):
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.client11b
|
||||
@pytest.mark.tarun2
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
@allure.title("NAT Mode Rate vs Range Test 2.4 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2495", name="WIFI-2495")
|
||||
def test_client_wpa2_personal_2g_11b(self, lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||
get_configuration, lf_tools):
|
||||
"""
|
||||
|
||||
pytest -m "ratevsrange and client11b" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
jira- wifi-2495
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
def test_rvr_nat_wpa2_personal_2g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT"
|
||||
mode = "NAT-WAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
print("station", station)
|
||||
|
||||
val = [['modes: 802.11b'], ['pkts: 60;142;256;512;1024;MTU;4000;9000'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:UDP;TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
station_names_twog = get_test_library.twog_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,passkey=security_key, mode=mode,
|
||||
band=band, num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
atn2 = ser_no[1].split(".")[2]
|
||||
print(f"antenuation-2 : {atn2}")
|
||||
# for i in range(4):
|
||||
# lf_test.attenuator_modify(int(atn2), i, 955)
|
||||
# time.sleep(0.5)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:;TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 0 100 210..+30..630'], ['attenuations2: 0 100 210..+30..630'], ['chamber: 0'], ['tt_deg: 0']]
|
||||
if station:
|
||||
time.sleep(3)
|
||||
rvr_o = lf_test.ratevsrange(station_name=station_names_twog, mode=mode,
|
||||
instance_name="NAT_RVR_11B_TWOG",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_twog, mode=mode, download_rate="100%",
|
||||
duration='60000',instance_name="MODEBRIDGE_RVR_TWOG",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries",entries)
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
pdf = False
|
||||
for i in entries:
|
||||
if ".pdf" in i:
|
||||
pdf = i
|
||||
if pdf:
|
||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
name=get_configuration["access_point"][0]["model"] + "ratevsrange")
|
||||
|
||||
|
||||
get_test_library.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||
|
||||
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||
print(str(kpi_val))
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 100, "medium": 95, "weak": 14}
|
||||
atn = [0, 10, 21, 24, 27,30,33,36,39,42,45,48,51,54,57,60,63]
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
print("kpi is empty, station did not got ip, Test failed")
|
||||
allure.attach(name="Kpi Data", body="station did not got ip Test failed.")
|
||||
assert False
|
||||
print("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
# count = 0
|
||||
direction = "DUT-TX"
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}--{direction}"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
# count += 1
|
||||
direction = "DUT-RX"
|
||||
start += 7
|
||||
print(pass_fail,"\nThroughput value-->",thrpt_val)
|
||||
if "FAIL" in pass_fail:
|
||||
print("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
print("Test passed successfully")
|
||||
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||
assert station
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.client11g
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2496", name="WIFI-2496")
|
||||
def test_client_wpa2_personal_2g_11g(self,
|
||||
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||
get_configuration, lf_tools):
|
||||
"""
|
||||
|
||||
pytest -m "ratevsrange and NAT and client11g" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
jira- wifi-2496
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
print("station", station)
|
||||
|
||||
val = [['modes: 802.11g'], ['pkts: 60;142;256;512;1024;MTU;4000;9000'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:UDP;TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
if station:
|
||||
time.sleep(3)
|
||||
rvr_o = lf_test.ratevsrange(station_name=station_names_twog, mode=mode,
|
||||
instance_name="NAT_RVR_11G_TWOG",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
pdf = False
|
||||
for i in entries:
|
||||
if ".pdf" in i:
|
||||
pdf = i
|
||||
if pdf:
|
||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
name=get_configuration["access_point"][0]["model"] + "ratevsrange")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||
script_dir = os.path.dirname(__file__) # Script directory
|
||||
print(script_dir)
|
||||
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||
print(str(kpi_val))
|
||||
if str(kpi_val) == "empty":
|
||||
print("kpi is empty, station did not got ip, Test failed")
|
||||
allure.attach(name="Kpi Data", body="station did not got ip Test failed.")
|
||||
assert False
|
||||
print("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
print("Test passed successfully")
|
||||
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||
assert station
|
||||
else:
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.client11a
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2497", name="WIFI-2497")
|
||||
def test_client_wpa2_personal_5g_11a(self,
|
||||
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
get_configuration,lf_tools):
|
||||
"""
|
||||
|
||||
pytest -m "ratevsrange and NAT and client11a" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
jira- wifi-2497
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
print("station", station)
|
||||
|
||||
val = [['modes: 802.11a'], ['pkts: 60;142;256;512;1024;MTU;4000;9000'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:UDP;TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
if station:
|
||||
time.sleep(3)
|
||||
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||
instance_name="NAT_RVR_11A_FIVEG",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
pdf = False
|
||||
for i in entries:
|
||||
if ".pdf" in i:
|
||||
pdf = i
|
||||
if pdf:
|
||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
name=get_configuration["access_point"][0]["model"] + "ratevsrange")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
kpi_val = lf_tools.read_kpi_file(column_name=['numeric-score'], dir_name=report_name)
|
||||
print(str(kpi_val))
|
||||
if str(kpi_val) == "empty":
|
||||
print("kpi is empty, station did not got ip, Test failed")
|
||||
allure.attach(name="Kpi Data", body="station did not got ip Test failed.")
|
||||
assert False
|
||||
else:
|
||||
print("Test passed successfully")
|
||||
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||
assert station
|
||||
else:
|
||||
assert False
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.client11an
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2498", name="WIFI-2498")
|
||||
def test_client_wpa2_personal_5g_11an(self,
|
||||
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
get_configuration, lf_tools):
|
||||
"""
|
||||
|
||||
pytest -m "ratevsrange and NAT and client11an" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
jira- wifi-2498
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
print("station", station)
|
||||
|
||||
val = [['modes: 802.11an'], ['pkts: 60;142;256;512;1024;MTU;4000;9000'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:UDP;TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||
['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
if station:
|
||||
time.sleep(3)
|
||||
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||
instance_name="NAT_RVR_11AN_FIVEG",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
pdf = False
|
||||
for i in entries:
|
||||
if ".pdf" in i:
|
||||
pdf = i
|
||||
if pdf:
|
||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
name=get_configuration["access_point"][0]["model"] + "ratevsrange")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||
print(str(kpi_val))
|
||||
if str(kpi_val) == "empty":
|
||||
print("kpi is empty, station did not got ip, Test failed")
|
||||
allure.attach(name="Kpi Data", body="station did not got ip Test failed.")
|
||||
assert False
|
||||
else:
|
||||
print("Test passed successfully")
|
||||
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||
assert station
|
||||
else:
|
||||
assert False
|
||||
print("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@pytest.mark.performance_advanced
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.client11ac
|
||||
@pytest.mark.tarun2
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
@allure.title("NAT Mode Rate vs Range Test 5 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2499", name="WIFI-2499")
|
||||
def test_client_wpa2_personal_5g_11ac(self, lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
get_configuration, lf_tools):
|
||||
"""
|
||||
|
||||
pytest -m "ratevsrange and NAT and client11ac" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
jira- wifi-2499
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
def test_rvr__nat_wpa2_personal_5g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT"
|
||||
mode = "NAT-WAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
station_names_fiveg = get_test_library.fiveg_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
print("station", station)
|
||||
|
||||
val = [['modes: 802.11an-AC'], ['pkts: 60;142;256;512;1024;MTU;4000;9000'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:UDP;TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'] ,['attenuator2: 1.1.3059'], ['attenuations: 0..+50..950'],['attenuations2: 0..+50..950']]
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
atn2 = ser_no[1].split(".")[2]
|
||||
print(f"antenuation-2 : {atn2}")
|
||||
# for i in range(4):
|
||||
# lf_test.attenuator_modify(int(atn2), i, 955)
|
||||
# time.sleep(0.5)
|
||||
val = [['modes: 802.11an-AC'], ['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: '+ str(ser_no[1])],
|
||||
['attenuations: 0 100 210..+30..540'],['attenuations2: 0 100 210..+30..540'],['chamber: 0'], ['tt_deg: 0']]
|
||||
|
||||
if station:
|
||||
time.sleep(3)
|
||||
rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||
instance_name="NAT_RVR_11AC_FIVEG",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_fiveg, mode=mode,download_rate="100%",
|
||||
duration='60000',instance_name="MODEBRIDGE_RVR_FIVEG",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
pdf = False
|
||||
for i in entries:
|
||||
if ".pdf" in i:
|
||||
pdf = i
|
||||
if pdf:
|
||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
name=get_configuration["access_point"][0]["model"] + "ratevsrange")
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||
print(str(kpi_val))
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 560, "medium": 220, "weak": 5}
|
||||
atn = [0, 10, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54]
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
print("kpi is empty, station did not got ip, Test failed")
|
||||
allure.attach(name="Kpi Data", body="station did not got ip Test failed.")
|
||||
assert False
|
||||
print("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
# count = 0
|
||||
direction = "DUT-TX"
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}--{direction}"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
# count += 1
|
||||
direction = "DUT-RX"
|
||||
start += 6
|
||||
print(pass_fail,"\nThroughput value-->",thrpt_val)
|
||||
if "FAIL" in pass_fail:
|
||||
print("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
print("Test passed successfully")
|
||||
allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||
assert station
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
print("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
print("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@@ -1,314 +1,212 @@
|
||||
# """
|
||||
#
|
||||
# Advanced Test: Rate v/s Range test under various combinations: VLAN Mode
|
||||
# pytest -m "throughput_benchmark_test and vlan" -s -vvv --skip-testrail --testbed=basic-01
|
||||
#
|
||||
#
|
||||
# """
|
||||
# import os
|
||||
# import time
|
||||
#
|
||||
# import pytest
|
||||
# import allure
|
||||
#
|
||||
# pytestmark = [pytest.mark.ratevsrange, pytest.mark.vlan ,pytest.mark.usefixtures("setup_test_run")]
|
||||
#
|
||||
#
|
||||
# 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": {
|
||||
# "is5GHz": {"channelBandwidth": "is20MHz"},
|
||||
# "is5GHzL": {"channelBandwidth": "is20MHz"},
|
||||
# "is5GHzU": {"channelBandwidth": "is20MHz"}
|
||||
# },
|
||||
# "radius": False
|
||||
# }
|
||||
#
|
||||
# @allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||
# @pytest.mark.parametrize(
|
||||
# 'setup_configuration',
|
||||
# [setup_params_general],
|
||||
# indirect=True,
|
||||
# scope="class"
|
||||
# )
|
||||
# @pytest.mark.usefixtures("setup_configuration")
|
||||
# @pytest.mark.Mhz20
|
||||
# class TestRatevsRangeVlan(object):
|
||||
#
|
||||
# @pytest.mark.wpa2_personal
|
||||
# @pytest.mark.twog
|
||||
# @pytest.mark.client11b
|
||||
# def test_client_wpa2_personal_2g_11b(self,
|
||||
# lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||
# get_configuration, lf_tools):
|
||||
# """
|
||||
#
|
||||
# pytest -m "ratevsrange and vlan and 11bclient" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
# jira- wifi-2495
|
||||
# """
|
||||
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
# ssid_name = profile_data["ssid_name"]
|
||||
# security_key = profile_data["security_key"]
|
||||
# security = "wpa2"
|
||||
# mode = "VLAN"
|
||||
# band = "twog"
|
||||
# vlan = 100
|
||||
# dut_name = create_lanforge_chamberview_dut
|
||||
# if ssid_name not in get_vif_state:
|
||||
# allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
# pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
# station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
# passkey=security_key, mode=mode, band=band,
|
||||
# station_name=station_names_twog, vlan_id=vlan)
|
||||
# print("station", station)
|
||||
#
|
||||
# val = [['modes: 802.11b'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||
# ['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||
# ['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
# if station:
|
||||
# time.sleep(3)
|
||||
# rvr_o = lf_test.ratevsrange(station_name=station_names_twog, mode=mode,
|
||||
# instance_name="VLAN_RVR_11B",
|
||||
# vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
# report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
# entries = os.listdir("../reports/" + report_name + '/')
|
||||
# pdf = False
|
||||
# for i in entries:
|
||||
# if ".pdf" in i:
|
||||
# pdf = i
|
||||
# if pdf:
|
||||
# allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
# name=get_configuration["access_point"][0]["model"] + "ratevsrange")
|
||||
# print("Test Completed... Cleaning up Stations")
|
||||
# lf_test.Client_disconnect(station_name=station_names_twog)
|
||||
# kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||
# print(str(kpi_val))
|
||||
# allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||
# assert station
|
||||
# else:
|
||||
# assert False
|
||||
#
|
||||
# @pytest.mark.wpa2_personal
|
||||
# @pytest.mark.twog
|
||||
# @pytest.mark.client11g
|
||||
# def test_client_wpa2_personal_2g_11g(self,
|
||||
# lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||
# get_configuration, lf_tools):
|
||||
# """
|
||||
#
|
||||
# pytest -m "ratevsrange and vlan and client11g" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
# jira- wifi-2496
|
||||
# """
|
||||
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
# ssid_name = profile_data["ssid_name"]
|
||||
# security_key = profile_data["security_key"]
|
||||
# security = "wpa2"
|
||||
# mode = "VLAN"
|
||||
# band = "twog"
|
||||
# vlan = 100
|
||||
# dut_name = create_lanforge_chamberview_dut
|
||||
# if ssid_name not in get_vif_state:
|
||||
# allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
# pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
# station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
# passkey=security_key, mode=mode, band=band,
|
||||
# station_name=station_names_twog, vlan_id=vlan)
|
||||
# print("station", station)
|
||||
#
|
||||
# val = [['modes: 802.11g'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||
# ['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||
# ['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
#
|
||||
# if station:
|
||||
# time.sleep(3)
|
||||
# rvr_o = lf_test.ratevsrange(station_name=station_names_twog, mode=mode,
|
||||
# instance_name="VLAN_RVR_11G",
|
||||
# vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
# report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
# entries = os.listdir("../reports/" + report_name + '/')
|
||||
# pdf = False
|
||||
# for i in entries:
|
||||
# if ".pdf" in i:
|
||||
# pdf = i
|
||||
# if pdf:
|
||||
# allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
# name=get_configuration["access_point"][0]["model"] + "ratevsrange")
|
||||
# print("Test Completed... Cleaning up Stations")
|
||||
# lf_test.Client_disconnect(station_name=station_names_twog)
|
||||
# kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||
# print(str(kpi_val))
|
||||
# allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||
# assert station
|
||||
# else:
|
||||
# assert False
|
||||
#
|
||||
# @pytest.mark.wpa2_personal
|
||||
# @pytest.mark.fiveg
|
||||
# @pytest.mark.client11a
|
||||
# def test_client_wpa2_personal_5g_11a(self,
|
||||
# lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
# get_configuration, lf_tools):
|
||||
# """
|
||||
#
|
||||
# pytest -m "ratevsrange and vlan and client11a" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
# jira- wifi-2497
|
||||
# """
|
||||
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
# ssid_name = profile_data["ssid_name"]
|
||||
# security_key = profile_data["security_key"]
|
||||
# security = "wpa2"
|
||||
# mode = "VLAN"
|
||||
# band = "fiveg"
|
||||
# vlan = 100
|
||||
# dut_name = create_lanforge_chamberview_dut
|
||||
# if ssid_name not in get_vif_state:
|
||||
# allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
# pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
# station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
# passkey=security_key, mode=mode, band=band,
|
||||
# station_name=station_names_fiveg, vlan_id=vlan)
|
||||
# print("station", station)
|
||||
#
|
||||
# val = [['modes: 802.11a'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||
# ['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||
# ['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
# if station:
|
||||
# time.sleep(3)
|
||||
# rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||
# instance_name="VLAN_RVR_11A",
|
||||
# vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
# report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
# entries = os.listdir("../reports/" + report_name + '/')
|
||||
# pdf = False
|
||||
# for i in entries:
|
||||
# if ".pdf" in i:
|
||||
# pdf = i
|
||||
# if pdf:
|
||||
# allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
# name=get_configuration["access_point"][0]["model"] + "ratevsrange")
|
||||
# print("Test Completed... Cleaning up Stations")
|
||||
# lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
# kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||
# print(str(kpi_val))
|
||||
# allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||
# assert station
|
||||
# else:
|
||||
# assert False
|
||||
#
|
||||
# @pytest.mark.wpa2_personal
|
||||
# @pytest.mark.fiveg
|
||||
# @pytest.mark.client11an
|
||||
# def test_client_wpa2_personal_5g_11an(self,
|
||||
# lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
# get_configuration,lf_tools):
|
||||
# """
|
||||
#
|
||||
# pytest -m "ratevsrange and vlan and client11an" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
# jira- wifi-2498
|
||||
# """
|
||||
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
# ssid_name = profile_data["ssid_name"]
|
||||
# security_key = profile_data["security_key"]
|
||||
# security = "wpa2"
|
||||
# mode = "VLAN"
|
||||
# band = "fiveg"
|
||||
# vlan = 100
|
||||
# dut_name = create_lanforge_chamberview_dut
|
||||
# if ssid_name not in get_vif_state:
|
||||
# allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
# pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
# station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
# passkey=security_key, mode=mode, band=band,
|
||||
# station_name=station_names_fiveg, vlan_id=vlan)
|
||||
# print("station", station)
|
||||
#
|
||||
# val = [['modes: 802.11an'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||
# ['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||
# ['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
# if station:
|
||||
# time.sleep(3)
|
||||
# rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||
# instance_name="VLAN_RVR_11AN",
|
||||
# vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
# report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
# entries = os.listdir("../reports/" + report_name + '/')
|
||||
# pdf = False
|
||||
# for i in entries:
|
||||
# if ".pdf" in i:
|
||||
# pdf = i
|
||||
# if pdf:
|
||||
# allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
# name=get_configuration["access_point"][0]["model"] + "ratevsrange")
|
||||
# print("Test Completed... Cleaning up Stations")
|
||||
# lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
# kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||
# print(str(kpi_val))
|
||||
# allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||
# assert station
|
||||
# else:
|
||||
# assert False
|
||||
#
|
||||
# @pytest.mark.performance_advanced
|
||||
# @pytest.mark.wpa2_personal
|
||||
# @pytest.mark.fiveg
|
||||
# @pytest.mark.client11ac
|
||||
# def test_client_wpa2_personal_5g_11ac(self,
|
||||
# lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
# get_configuration, lf_tools):
|
||||
# """
|
||||
#
|
||||
# pytest -m "ratevsrange and vlan and client11ac" -s -vvv --skip-testrail --testbed=advanced-02
|
||||
# jira- wifi-2499
|
||||
# """
|
||||
# profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
# ssid_name = profile_data["ssid_name"]
|
||||
# security_key = profile_data["security_key"]
|
||||
# security = "wpa2"
|
||||
# mode = "VLAN"
|
||||
# band = "fiveg"
|
||||
# vlan = 1
|
||||
# dut_name = create_lanforge_chamberview_dut
|
||||
# if ssid_name not in get_vif_state:
|
||||
# allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
# pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
# station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
# passkey=security_key, mode=mode, band=band,
|
||||
# station_name=station_names_fiveg, vlan_id=vlan)
|
||||
# print("station", station)
|
||||
#
|
||||
# val = [['modes: 802.11an-AC'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:TCP'],
|
||||
# ['bandw_options: AUTO'], ['spatial_streams: AUTO'], ['attenuator: 1.1.3034'], ['attenuator2: 1.1.3059'],
|
||||
# ['attenuations: 0..+50..950'], ['attenuations2: 0..+50..950']]
|
||||
#
|
||||
# if station:
|
||||
# time.sleep(3)
|
||||
# rvr_o = lf_test.ratevsrange(station_name=station_names_fiveg, mode=mode,
|
||||
# instance_name="VLAN_RVR_11AC",
|
||||
# vlan_id=vlan, dut_name=dut_name, raw_lines=val)
|
||||
# report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
# entries = os.listdir("../reports/" + report_name + '/')
|
||||
# pdf = False
|
||||
# for i in entries:
|
||||
# if ".pdf" in i:
|
||||
# pdf = i
|
||||
# if pdf:
|
||||
# allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
# name=get_configuration["access_point"][0]["model"] + "ratevsrange")
|
||||
# print("Test Completed... Cleaning up Stations")
|
||||
# lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
# kpi_val = lf_tools.read_kpi_file(column_name=None, dir_name=report_name)
|
||||
# print(str(kpi_val))
|
||||
# allure.attach(name="Kpi Data", body=str(kpi_val))
|
||||
# assert station
|
||||
# else:
|
||||
# assert False
|
||||
"""
|
||||
|
||||
Test Rate v/s Range : Vlan Mode
|
||||
pytest -m "rate_vs_range"
|
||||
"""
|
||||
import os
|
||||
import time
|
||||
import pytest
|
||||
import allure
|
||||
import os.path
|
||||
import logging
|
||||
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.rate_vs_range, pytest.mark.vlan]
|
||||
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan":100},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan":100}
|
||||
]
|
||||
},
|
||||
"rf": {
|
||||
"5G":{
|
||||
"channel-width": 80},
|
||||
"2G":{
|
||||
"channel-width": 20}
|
||||
},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
@allure.feature("VLAN MODE RATE VS RANGE")
|
||||
@allure.parent_suite("RATE VS RANGE")
|
||||
@allure.suite(suite_name="VLAN MODE")
|
||||
@allure.sub_suite(sub_suite_name="WPA2_personal RATE VS RANGE")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
@pytest.mark.Mhz20
|
||||
class Test_RatevsRange_Bridge(object):
|
||||
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
@allure.title("Vlan Mode Rate vs Range Test 2.4 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2495", name="WIFI-2495")
|
||||
def test_rvr_bridge_wpa2_personal_2g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = 100
|
||||
station_names_twog = get_test_library.twog_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,passkey=security_key, mode=mode,
|
||||
band=band, num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
atn2 = ser_no[1].split(".")[2]
|
||||
print(f"antenuation-2 : {atn2}")
|
||||
# for i in range(4):
|
||||
# lf_test.attenuator_modify(int(atn2), i, 955)
|
||||
# time.sleep(0.5)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:;TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 0 100 210..+30..630'], ['attenuations2: 0 100 210..+30..630'], ['chamber: 0'], ['tt_deg: 0']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_twog, mode=mode, download_rate="100%",
|
||||
duration='60000',instance_name="MODEBRIDGE_RVR_TWOG",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries",entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 100, "medium": 95, "weak": 14}
|
||||
atn = [0, 10, 21, 24, 27,30,33,36,39,42,45,48,51,54,57,60,63]
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
print("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
# count = 0
|
||||
direction = "DUT-TX"
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}--{direction}"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
# count += 1
|
||||
direction = "DUT-RX"
|
||||
start += 7
|
||||
print(pass_fail,"\nThroughput value-->",thrpt_val)
|
||||
if "FAIL" in pass_fail:
|
||||
print("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
print("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
print("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
print("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@pytest.mark.performance_advanced
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
@allure.title("Vlan Mode Rate vs Range Test 5 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2499", name="WIFI-2499")
|
||||
def test_rvr_bridge_wpa2_personal_5g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 100
|
||||
station_names_fiveg = get_test_library.fiveg_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
print("station", station)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
atn2 = ser_no[1].split(".")[2]
|
||||
print(f"antenuation-2 : {atn2}")
|
||||
# for i in range(4):
|
||||
# lf_test.attenuator_modify(int(atn2), i, 955)
|
||||
# time.sleep(0.5)
|
||||
val = [['modes: 802.11an-AC'], ['pkts: MTU'], ['directions: DUT Transmit;DUT Receive'], ['traffic_types:TCP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: '+ str(ser_no[1])],
|
||||
['attenuations: 0 100 210..+30..540'],['attenuations2: 0 100 210..+30..540'],['chamber: 0'], ['tt_deg: 0']]
|
||||
|
||||
if station:
|
||||
time.sleep(3)
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_fiveg, mode=mode,download_rate="100%",
|
||||
duration='60000',instance_name="MODEBRIDGE_RVR_FIVEG",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name, pdf_name="Rate vs Range Test")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 560, "medium": 220, "weak": 5}
|
||||
atn = [0, 10, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54]
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
print("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
# count = 0
|
||||
direction = "DUT-TX"
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}--{direction}"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
# count += 1
|
||||
direction = "DUT-RX"
|
||||
start += 6
|
||||
print(pass_fail,"\nThroughput value-->",thrpt_val)
|
||||
if "FAIL" in pass_fail:
|
||||
print("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
print("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
print("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
print("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,147 +0,0 @@
|
||||
"""
|
||||
|
||||
Performance Test: Receiver Sensitivity Test: bridge Mode
|
||||
pytest -m "rx_sensitivity_test and bridge"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.rx_sensitivity_test, pytest.mark.bridge,
|
||||
pytest.mark.usefixtures("setup_test_run")]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {
|
||||
"is5GHz": {"channelBandwidth": "is20MHz"},
|
||||
"is5GHzL": {"channelBandwidth": "is20MHz"},
|
||||
"is5GHzU": {"channelBandwidth": "is20MHz"}},
|
||||
"radius": False,
|
||||
|
||||
"attenuator": {
|
||||
"attenuator": "1.1.3059",
|
||||
"attenuator2": "1.1.3034"}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("BRIDGE MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestRxSensitivityBRIDGEAllMcs5G(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2445", name="WIFI-2445")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.all_mcs
|
||||
def test_client_wpa2_personal_bridge_all_mcs_5g(self,
|
||||
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
get_configuration):
|
||||
"""Receiver Sensitivity Bridge Mode
|
||||
pytest -m "rx_sensitivity_test and bridge and wpa2_personal and fiveg"
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
attenuator = setup_params_general["attenuator"]["attenuator"]
|
||||
attenuator2 = setup_params_general["attenuator"]["attenuator2"]
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
raw_lines = [['txo_preamble: VHT'],
|
||||
['txo_mcs: 0 CCK, OFDM, HT, VHT;1 CCK, OFDM, HT, VHT;2 CCK, OFDM, HT, VHT;3 CCK, OFDM, HT, VHT;'
|
||||
'4 OFDM, HT, VHT;5 OFDM, HT, VHT;6 OFDM, HT, VHT;7 OFDM, HT, VHT;8 VHT;9 VHT'],
|
||||
['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: OFF'],
|
||||
['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2],
|
||||
["show_3s: 1"], ['txo_txpower: 17'],
|
||||
["show_ll_graphs: 1"], ["show_log: 1"]]
|
||||
if ssid_name not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if station:
|
||||
dp_obj = lf_test.rx_sensitivity(station_name=station_names_fiveg, mode=mode,
|
||||
instance_name="TIP_RX_SEN_WPA2_BRIDGE_5G_ALL_MCS",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
|
||||
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
pdf = False
|
||||
for i in entries:
|
||||
if ".pdf" in i:
|
||||
pdf = i
|
||||
if pdf:
|
||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
name=get_configuration["access_point"][0]["model"] + "_dataplane")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
assert station
|
||||
else:
|
||||
assert False
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2445", name="WIFI-2445")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.all_mcs
|
||||
def test_client_wpa2_personal_bridge_all_mcs_2g(self,
|
||||
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||
get_configuration):
|
||||
"""Receiver Sensitivity Bridge Mode
|
||||
pytest -m "rx_sensitivity_test and bridge and wpa2_personal and twog"
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
attenuator = setup_params_general["attenuator"]["attenuator"]
|
||||
attenuator2 = setup_params_general["attenuator"]["attenuator2"]
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
raw_lines = [['txo_preamble: VHT'],
|
||||
['txo_mcs: 0 CCK, OFDM, HT, VHT;1 CCK, OFDM, HT, VHT;2 CCK, OFDM, HT, VHT;3 CCK, OFDM, HT, VHT'
|
||||
'4 OFDM, HT, VHT;5 OFDM, HT, VHT;6 OFDM, HT, VHT;7 OFDM, HT, VHT;8 VHT;9 VHT'],
|
||||
['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: OFF'],
|
||||
['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2],
|
||||
["show_3s: 1"], ['txo_txpower: 17'],
|
||||
["show_ll_graphs: 1"], ["show_log: 1"]]
|
||||
if ssid_name not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if station:
|
||||
dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode,
|
||||
instance_name="TIP_PERF_RX_SEN_WPA2_BRIDGE_2G_ALL_MCS",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
|
||||
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
pdf = False
|
||||
for i in entries:
|
||||
if ".pdf" in i:
|
||||
pdf = i
|
||||
if pdf:
|
||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
name=get_configuration["access_point"][0]["model"] + "_dataplane")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||
assert station
|
||||
else:
|
||||
assert False
|
||||
@@ -1,125 +0,0 @@
|
||||
"""
|
||||
|
||||
Performance Test: Receiver Sensitivity Test: bridge Mode
|
||||
pytest -m "rxsensitivity and bridge"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.rxsensitivity, pytest.mark.bridge]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"rf": {},
|
||||
"radius": False
|
||||
}
|
||||
|
||||
@allure.feature("BRIDGE MODE RECEIVER SENSITIVITY TEST")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestRxSensitivityBridge(object):
|
||||
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2445", name="WIFI-2445")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.all_mcs
|
||||
def test_client_wpa2_personal_bridge_all_mcs_5g(self, lf_test, lf_tools, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
get_configuration):
|
||||
"""
|
||||
Receiver Sensitivity Bridge Mode
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
ser_no = lf_test.attenuator_serial()
|
||||
print(ser_no)
|
||||
raw_lines = [['txo_preamble: VHT'],
|
||||
['txo_mcs: 0 CCK, OFDM, HT, VHT;1 CCK, OFDM, HT, VHT;2 CCK, OFDM, HT, VHT;3 CCK, OFDM, HT, VHT;'
|
||||
'4 OFDM, HT, VHT;5 OFDM, HT, VHT;6 OFDM, HT, VHT;7 OFDM, HT, VHT;8 VHT;9 VHT'],
|
||||
['spatial_streams: 2'], ['bandw_options: 80'], ['txo_sgi: OFF'],
|
||||
['txo_retries: No Retry'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 0..+50..800'], ['attenuations2: 0..+50..800'],
|
||||
["show_3s: 1"], ['txo_txpower: 17'],
|
||||
["show_ll_graphs: 1"], ["show_log: 1"]]
|
||||
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if station:
|
||||
obj = lf_test.rx_sensitivity(station_name=station_names_fiveg, mode=mode,
|
||||
instance_name="RECEIVER_SENSITIVITY_BRIDGE_5G",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
|
||||
report_name = obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Receiver sensitivity test")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
assert station
|
||||
else:
|
||||
assert False
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2445", name="WIFI-2445")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.all_mcs
|
||||
def test_client_wpa2_personal_bridge_all_mcs_2g(self, lf_test, lf_tools, station_names_twog,
|
||||
create_lanforge_chamberview_dut,
|
||||
get_configuration):
|
||||
"""
|
||||
Receiver Sensitivity Bridge Mode
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
ser_no = lf_test.attenuator_serial()
|
||||
print(ser_no)
|
||||
raw_lines = [['txo_preamble: VHT'],
|
||||
['txo_mcs: 0 CCK, OFDM, HT, VHT;1 CCK, OFDM, HT, VHT;2 CCK, OFDM, HT, VHT;3 CCK, OFDM, HT, VHT;'
|
||||
'4 OFDM, HT, VHT;5 OFDM, HT, VHT;6 OFDM, HT, VHT;7 OFDM, HT, VHT;8 VHT;9 VHT'],
|
||||
['spatial_streams: 2'], ['bandw_options: 80'], ['txo_sgi: OFF'],
|
||||
['txo_retries: No Retry'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 0..+50..800'], ['attenuations2: 0..+50..800'],
|
||||
["show_3s: 1"], ['txo_txpower: 17'],
|
||||
["show_ll_graphs: 1"], ["show_log: 1"]]
|
||||
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if station:
|
||||
obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode,
|
||||
instance_name="RECEIVER_SENSITIVITY_BRIDGE_2G",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
|
||||
report_name = obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
lf_tools.attach_report_graphs(report_name=report_name, pdf_name="Receiver sensitivity test")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||
assert station
|
||||
else:
|
||||
assert False
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,147 +0,0 @@
|
||||
"""
|
||||
|
||||
Performance Test: Receiver Sensitivity Test: NAT Mode
|
||||
pytest -m "rx_sensitivity_test and nat"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.rx_sensitivity_test, pytest.mark.nat,
|
||||
pytest.mark.usefixtures("setup_test_run")]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["is2dot4GHz"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"],
|
||||
"security_key": "something"}]},
|
||||
"rf": {
|
||||
"is5GHz": {"channelBandwidth": "is20MHz"},
|
||||
"is5GHzL": {"channelBandwidth": "is20MHz"},
|
||||
"is5GHzU": {"channelBandwidth": "is20MHz"}},
|
||||
"radius": False,
|
||||
|
||||
"attenuator": {
|
||||
"attenuator": "1.1.3059",
|
||||
"attenuator2": "1.1.3034"}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@allure.feature("NAT MODE CLIENT CONNECTIVITY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestRxSensitivityNATAllMcs5G(object):
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2445", name="WIFI-2445")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.all_mcs
|
||||
def test_client_wpa2_personal_nat_all_mcs_5g(self,
|
||||
lf_test, station_names_fiveg, create_lanforge_chamberview_dut,
|
||||
get_configuration):
|
||||
"""Receiver Sensitivity nat Mode
|
||||
pytest -m "rx_sensitivity_test and nat and wpa2_personal and fiveg"
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
attenuator = setup_params_general["attenuator"]["attenuator"]
|
||||
attenuator2 = setup_params_general["attenuator"]["attenuator2"]
|
||||
mode = "NAT"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
raw_lines = [['txo_preamble: VHT'],
|
||||
['txo_mcs: 0 CCK, OFDM, HT, VHT;1 CCK, OFDM, HT, VHT;2 CCK, OFDM, HT, VHT;3 CCK, OFDM, HT, VHT'
|
||||
'4 OFDM, HT, VHT;5 OFDM, HT, VHT;6 OFDM, HT, VHT;7 OFDM, HT, VHT;8 VHT;9 VHT'],
|
||||
['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: OFF'],
|
||||
['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2],
|
||||
["show_3s: 1"], ['txo_txpower: 17'],
|
||||
["show_ll_graphs: 1"], ["show_log: 1"]]
|
||||
if ssid_name not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_fiveg, vlan_id=vlan)
|
||||
|
||||
if station:
|
||||
dp_obj = lf_test.rx_sensitivity(station_name=station_names_fiveg, mode=mode,
|
||||
instance_name="TIP_PERF_RX_SEN_WPA2_NAT_5G_ALL_MCS",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
|
||||
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
pdf = False
|
||||
for i in entries:
|
||||
if ".pdf" in i:
|
||||
pdf = i
|
||||
if pdf:
|
||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
name=get_configuration["access_point"][0]["model"] + "_dataplane")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_fiveg)
|
||||
assert station
|
||||
else:
|
||||
assert False
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2445", name="WIFI-2445")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.all_mcs
|
||||
def test_client_wpa2_personal_nat_all_mcs_2g(self,
|
||||
lf_test, station_names_twog, create_lanforge_chamberview_dut,
|
||||
get_configuration):
|
||||
"""Receiver Sensitivity nat Mode
|
||||
pytest -m "rx_sensitivity_test and nat and wpa2_personal and twog"
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
attenuator = setup_params_general["attenuator"]["attenuator"]
|
||||
attenuator2 = setup_params_general["attenuator"]["attenuator2"]
|
||||
mode = "NAT"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
dut_name = create_lanforge_chamberview_dut
|
||||
raw_lines = [['txo_preamble: VHT'],
|
||||
['txo_mcs: 0 CCK, OFDM, HT, VHT;1 CCK, OFDM, HT, VHT;2 CCK, OFDM, HT, VHT;3 CCK, OFDM, HT, VHT'
|
||||
'4 OFDM, HT, VHT;5 OFDM, HT, VHT;6 OFDM, HT, VHT;7 OFDM, HT, VHT;8 VHT;9 VHT'],
|
||||
['spatial_streams: 1'], ['bandw_options: 20'], ['txo_sgi: OFF'],
|
||||
['txo_retries: No Retry'], ['attenuator: %s' % attenuator], ['attenuator2: %s' % attenuator2],
|
||||
["show_3s: 1"], ['txo_txpower: 17'],
|
||||
["show_ll_graphs: 1"], ["show_log: 1"]]
|
||||
if ssid_name not in get_vif_state:
|
||||
allure.attach(name="retest,vif state ssid not available:", body=str(get_vif_state))
|
||||
pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
|
||||
station = lf_test.Client_Connect(ssid=ssid_name, security=security,
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
station_name=station_names_twog, vlan_id=vlan)
|
||||
|
||||
if station:
|
||||
dp_obj = lf_test.rx_sensitivity(station_name=station_names_twog, mode=mode,
|
||||
instance_name="TIP_PERF_RX_SEN_WPA2_NAT_2G_ALL_MCS",
|
||||
vlan_id=vlan, dut_name=dut_name, raw_lines=raw_lines)
|
||||
report_name = dp_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
pdf = False
|
||||
for i in entries:
|
||||
if ".pdf" in i:
|
||||
pdf = i
|
||||
if pdf:
|
||||
allure.attach.file(source="../reports/" + report_name + "/" + pdf,
|
||||
name=get_configuration["access_point"][0]["model"] + "_dataplane")
|
||||
print("Test Completed... Cleaning up Stations")
|
||||
lf_test.Client_disconnect(station_name=station_names_twog)
|
||||
assert station
|
||||
else:
|
||||
assert False
|
||||
@@ -14,8 +14,9 @@ setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}]},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
]},
|
||||
"rf": {
|
||||
"2G": {"channel-width": 20},
|
||||
"5G": {"channel-width": 80},
|
||||
@@ -35,7 +36,7 @@ setup_params_general = {
|
||||
@allure.sub_suite("Bridge Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestRxSensitivityBRIDGE2G(object):
|
||||
class TestRxSensitivityBridge(object):
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2446", name="WIFI-2446")
|
||||
@pytest.mark.twog
|
||||
@@ -44,7 +45,7 @@ class TestRxSensitivityBRIDGE2G(object):
|
||||
"""Receiver Sensitivity Bridge Mode
|
||||
pytest -m "rx_sensitivity_tests and bridge and wpa2_personal and twog"
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
@@ -76,20 +77,16 @@ class TestRxSensitivityBRIDGE2G(object):
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + get_test_library.dut_idx_mapping[str(i)][4] + f' ({i+1})' \
|
||||
f'' if get_test_library.dut_idx_mapping[str(i)][3] == "5G" else "NA"
|
||||
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + get_test_library.dut_idx_mapping[str(i)][4] + f' ({i+1})' \
|
||||
f'' if get_test_library.dut_idx_mapping[str(i)][3] == "2G" else "NA"
|
||||
'' + get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
|
||||
instance_name = "rx_sens_TR398"
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,dut_name=dut_name,
|
||||
dut_5g=dut_5g, dut_2g=dut_2g, mode=mode, vlan_id=vlan, skip_2g=False,
|
||||
skip_5g=True, instance_name=instance_name, test="rxsens", ssid_name=ssid_name,
|
||||
security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration)
|
||||
move_to_influx=False, dut_data=setup_configuration, tr398v2=True)
|
||||
|
||||
if result:
|
||||
assert True
|
||||
@@ -103,12 +100,12 @@ class TestRxSensitivityBRIDGE2G(object):
|
||||
"""Receiver Sensitivity Bridge Mode
|
||||
pytest -m "rx_sensitivity_tests and bridge and wpa2_personal and fiveg"
|
||||
"""
|
||||
profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
@@ -135,25 +132,19 @@ class TestRxSensitivityBRIDGE2G(object):
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' ({i + 1})' \
|
||||
f'' if get_test_library.dut_idx_mapping[str(i)][
|
||||
3] == "5G" else "NA"
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
|
||||
dut_2g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' ({i + 1})' \
|
||||
f'' if get_test_library.dut_idx_mapping[str(i)][
|
||||
3] == "2G" else "NA"
|
||||
|
||||
instance_name = "rx_sens_TR398"
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, instance_name=instance_name,
|
||||
test="rxsens", ssid_name=ssid_name, security_key=security_key,
|
||||
security=security, move_to_influx=False, dut_data=setup_configuration)
|
||||
|
||||
security=security, move_to_influx=False, dut_data=setup_configuration,
|
||||
tr398v2=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
151
tests/e2e/advanced/receiver_sensitivity/test_rx_sens_nat_mode.py
Normal file
151
tests/e2e/advanced/receiver_sensitivity/test_rx_sens_nat_mode.py
Normal file
@@ -0,0 +1,151 @@
|
||||
"""
|
||||
|
||||
Performance Test: Receiver Sensitivity Test: nat Mode
|
||||
pytest -m "rx_sensitivity_tests and wpa2_personal and nat"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.rx_sensitivity_tests, pytest.mark.nat, pytest.mark.wpa2_personal]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
]},
|
||||
"rf": {
|
||||
"2G": {"channel-width": 20},
|
||||
"5G": {"channel-width": 80},
|
||||
},
|
||||
"radius": False,
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Receiver Sensitivity Tests")
|
||||
@allure.suite("WPA2 Personal Security")
|
||||
@allure.sub_suite("NatMode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestRxSensitivityNAT2G(object):
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2446", name="WIFI-2446")
|
||||
@pytest.mark.twog
|
||||
@allure.title("Test for Receiver Sensitivity for 2.4G band")
|
||||
def test_client_wpa2_personal_nat_2g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""Receiver Sensitivity Nat Mode
|
||||
pytest -m "rx_sensitivity_tests and nat and wpa2_personal and twog"
|
||||
"""
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT-WAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
|
||||
instance_name = "rx_sens_TR398"
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,dut_name=dut_name,
|
||||
dut_5g=dut_5g, dut_2g=dut_2g, mode=mode, vlan_id=vlan, skip_2g=False,
|
||||
skip_5g=True, instance_name=instance_name, test="rxsens", ssid_name=ssid_name,
|
||||
security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, tr398v2=True)
|
||||
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2446", name="WIFI-2446")
|
||||
@pytest.mark.fiveg
|
||||
@allure.title("Test for Receiver Sensitivity for 5G band")
|
||||
def test_client_wpa2_personal_nat_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""Receiver Sensitivity Nat Mode
|
||||
pytest -m "rx_sensitivity_tests and nat and wpa2_personal and fiveg"
|
||||
"""
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT-WAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
|
||||
|
||||
instance_name = "rx_sens_TR398"
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, instance_name=instance_name,
|
||||
test="rxsens", ssid_name=ssid_name, security_key=security_key,
|
||||
security=security, move_to_influx=False, dut_data=setup_configuration,
|
||||
tr398v2=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
@@ -0,0 +1,151 @@
|
||||
"""
|
||||
|
||||
Performance Test: Receiver Sensitivity Test: vlan Mode
|
||||
pytest -m "rx_sensitivity_tests and wpa2_personal and vlan"
|
||||
|
||||
"""
|
||||
import os
|
||||
import pytest
|
||||
import allure
|
||||
|
||||
pytestmark = [pytest.mark.rx_sensitivity_tests, pytest.mark.vlan, pytest.mark.wpa2_personal]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan":100},
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan":100}
|
||||
]},
|
||||
"rf": {
|
||||
"2G": {"channel-width": 20},
|
||||
"5G": {"channel-width": 80},
|
||||
},
|
||||
"radius": False,
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@allure.parent_suite("Receiver Sensitivity Tests")
|
||||
@allure.suite("WPA2 Personal Security")
|
||||
@allure.sub_suite("Vlan Mode")
|
||||
@allure.feature("TR-398 Issue 2")
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class TestRxSensitivityVLAN2G(object):
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2446", name="WIFI-2446")
|
||||
@pytest.mark.twog
|
||||
@allure.title("Test for Receiver Sensitivity for 2.4G band")
|
||||
def test_client_wpa2_personal_vlan_2g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""Receiver Sensitivity Vlan Mode
|
||||
pytest -m "rx_sensitivity_tests and vlan and wpa2_personal and twog"
|
||||
"""
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = [100]
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "2G":
|
||||
dut_2g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
|
||||
instance_name = "rx_sens_TR398"
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,dut_name=dut_name,
|
||||
dut_5g=dut_5g, dut_2g=dut_2g, mode=mode, vlan_id=vlan, skip_2g=False,
|
||||
skip_5g=True, instance_name=instance_name, test="rxsens", ssid_name=ssid_name,
|
||||
security_key=security_key, security=security,
|
||||
move_to_influx=False, dut_data=setup_configuration, tr398v2=True)
|
||||
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2446", name="WIFI-2446")
|
||||
@pytest.mark.fiveg
|
||||
@allure.title("Test for Receiver Sensitivity for 5G band")
|
||||
def test_client_wpa2_personal_vlan_5g(self, get_test_library, setup_configuration, check_connectivity):
|
||||
"""Receiver Sensitivity Vlan Mode
|
||||
pytest -m "rx_sensitivity_tests and vlan and wpa2_personal and fiveg"
|
||||
"""
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = [100]
|
||||
dut_name = list(setup_configuration.keys())[0]
|
||||
dut_5g, dut_2g = "", ""
|
||||
radios_2g, radios_5g, radios_ax = [], [], []
|
||||
data = get_test_library.json_get(_req_url="/port?fields=alias,port,mode")
|
||||
data = data['interfaces']
|
||||
port, port_data = "", []
|
||||
for i in data:
|
||||
for j in i:
|
||||
if i[j]['mode'] != '':
|
||||
port_data.append(i)
|
||||
|
||||
for item in range(len(port_data)):
|
||||
for p in port_data[item]:
|
||||
temp = port_data[item][p]['port'].split('.')
|
||||
temp = list(map(int, temp))
|
||||
temp = list(map(str, temp))
|
||||
port = ".".join(temp)
|
||||
if port_data[item][p]['mode'] == '802.11bgn-AC':
|
||||
radios_2g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11an-AC':
|
||||
radios_5g.append(port + " " + port_data[item][p]['alias'])
|
||||
if port_data[item][p]['mode'] == '802.11abgn-AX':
|
||||
radios_ax.append(port + " " + port_data[item][p]['alias'])
|
||||
for i in setup_configuration[dut_name]['ssid_data']:
|
||||
get_test_library.dut_idx_mapping[str(i)] = list(setup_configuration[dut_name]['ssid_data'][i].values())
|
||||
if get_test_library.dut_idx_mapping[str(i)][3] == "5G":
|
||||
dut_5g = dut_name + ' ' + get_test_library.dut_idx_mapping[str(i)][0] + ' ' \
|
||||
'' + \
|
||||
get_test_library.dut_idx_mapping[str(i)][4] + f' (1)'
|
||||
|
||||
|
||||
instance_name = "rx_sens_TR398"
|
||||
result, description = get_test_library.tr398(radios_2g=radios_2g, radios_5g=radios_5g, radios_ax=radios_ax,
|
||||
dut_name=dut_name, dut_5g=dut_5g, dut_2g=dut_2g, mode=mode,
|
||||
vlan_id=vlan, skip_2g=True, skip_5g=False, instance_name=instance_name,
|
||||
test="rxsens", ssid_name=ssid_name, security_key=security_key,
|
||||
security=security, move_to_influx=False, dut_data=setup_configuration,
|
||||
tr398v2=True)
|
||||
if result:
|
||||
assert True
|
||||
else:
|
||||
assert False, description
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,351 @@
|
||||
"""
|
||||
|
||||
Test Spacial Consistency: Bridge Mode
|
||||
pytest -m spatial_consistency
|
||||
"""
|
||||
|
||||
import pytest
|
||||
import allure
|
||||
import logging
|
||||
import os
|
||||
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.spatial_consistency, pytest.mark.bridge]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "BRIDGE",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"rf": {
|
||||
"5G":{
|
||||
"channel-width": 80},
|
||||
"2G":{
|
||||
"channel-width": 20}
|
||||
},
|
||||
"radius": False
|
||||
}
|
||||
@allure.feature("BRIDGE MODE SPACIAL CONSISTENCY")
|
||||
@allure.parent_suite("SPACIAL CONSISTENCY")
|
||||
@allure.suite(suite_name="BRIDGE MODE")
|
||||
@allure.sub_suite(sub_suite_name="WPA2_personal SPACIAL CONSISTENCY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class Test_SpatialConsistency_Bridge(object):
|
||||
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
@allure.title("BRIDGE Mode Spacial Consistency Test (NSS-1) UDP-Download 2.4 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5052", name="WIFI-5052")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.nss1
|
||||
@pytest.mark.tarun1
|
||||
def test_udp_download_nss1_wpa2_personal_2g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
station_names_twog = get_test_library.twog_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,passkey=security_key, mode=mode,
|
||||
band=band,num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:UDP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 1'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 100 380 480'],['attenuations2: 100 380 480'],['chamber: DUT-Chamber'], ['tt_deg: 0..+60..300']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_twog, mode=mode, download_rate="100%",
|
||||
instance_name="SPATIAL_NSS1_RVR1_TWOG", duration="60000",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name,
|
||||
pdf_name="Rate vs Range Test - UDP 2.4G")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
logging.info("Test Completed... Cleaning up Stations")
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 45, "medium": 35, "weak": 17}
|
||||
atn, deg = [10, 38, 48], [0, 60, 120, 180, 240, 300] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
logging.info("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
# start += 6
|
||||
print(thrpt_val, "\n", pass_fail)
|
||||
if "FAIL" in pass_fail:
|
||||
logging.info("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
logging.info("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
logging.info("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
logging.info("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
@allure.title("BRIDGE Mode Spacial Consistency Test (NSS-2) UDP-Download 2.4 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5068", name="WIFI-5068")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.nss2
|
||||
def test_udp_download_nss2_wpa2_personal_2g(self,setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
station_names_twog = get_test_library.twog_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security, passkey=security_key, mode=mode,
|
||||
band=band, num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:UDP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 100 380 480'], ['attenuations2: 100 380 480'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+60..300']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_twog, mode=mode, download_rate="100%",
|
||||
instance_name="SPATIAL_NSS2_RVR1_TWOG",duration="60000",vlan_id=vlan,
|
||||
dut_name=dut_name,raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name,
|
||||
pdf_name="Rate vs Range Test - UDP 2.4G")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
logging.info("Test Completed... Cleaning up Stations")
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 90, "medium": 70, "weak": 35}
|
||||
atn, deg = [10, 38, 48], [0, 60, 120, 180, 240, 300] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
logging.info("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
# start += 6
|
||||
print(thrpt_val, "\n", pass_fail)
|
||||
if "FAIL" in pass_fail:
|
||||
logging.info("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
logging.info("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
logging.info("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
logging.info("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
@allure.title("BRIDGE Mode Spacial Consistency Test (NSS-1) UDP-Download 5 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5067", name="WIFI-5067")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.nss1
|
||||
@pytest.mark.tarun1
|
||||
def test_udp_download_nss1_wpa2_personal_5g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
station_names_fiveg = get_test_library.fiveg_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,passkey=security_key, mode=mode,
|
||||
band=band,num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:UDP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 1'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 100 250 350'], ['attenuations2: 100 250 350'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+60..300']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_fiveg, mode=mode, download_rate="100%",
|
||||
instance_name="SPATIAL_NSS1_RVR1_FIVEG",duration="60000",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name,
|
||||
pdf_name="Rate vs Range Test - UDP 5G")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
logging.info("Test Completed... Cleaning up Stations")
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 250, "medium": 150, "weak": 75}
|
||||
atn, deg = [10, 25, 35], [0, 60, 120, 180, 240, 300] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
logging.info("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
# start += 6
|
||||
print(thrpt_val, "\n", pass_fail)
|
||||
if "FAIL" in pass_fail:
|
||||
logging.info("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
logging.info("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
logging.info("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
logging.info("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
@allure.title("BRIDGE Mode Spacial Consistency Test (NSS-2) UDP-Download 5 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5066", name="WIFI-5066")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.nss2
|
||||
def test_udp_download_nss2_wpa2_personal_5g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "BRIDGE"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
station_names_fiveg = get_test_library.fiveg_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,passkey=security_key, mode=mode,
|
||||
band=band,num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
print("station", station)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:UDP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])],
|
||||
['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 100 250 350'], ['attenuations2: 100 250 350'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+60..300']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_fiveg, mode=mode, download_rate="100%",
|
||||
instance_name="SPATIAL_NSS2_RVR1_FIVEG",duration="60000",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name,
|
||||
pdf_name="Rate vs Range Test - UDP 2.4G")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
logging.info("Test Completed... Cleaning up Stations")
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 500, "medium": 300, "weak": 150}
|
||||
atn, deg = [10, 25, 35], [0, 60, 120, 180, 240, 300] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
logging.info("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
# start += 6
|
||||
print(thrpt_val, "\n", pass_fail)
|
||||
if "FAIL" in pass_fail:
|
||||
logging.info("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
logging.info("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
logging.info("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
logging.info("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,351 @@
|
||||
"""
|
||||
|
||||
Test Spacial Consistency: Nat Mode
|
||||
pytest -m spatial_consistency
|
||||
"""
|
||||
|
||||
import pytest
|
||||
import allure
|
||||
import logging
|
||||
import os
|
||||
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.spatial_consistency, pytest.mark.bridge]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "NAT",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
]
|
||||
},
|
||||
"rf": {
|
||||
"5G":{
|
||||
"channel-width": 80},
|
||||
"2G":{
|
||||
"channel-width": 20}
|
||||
},
|
||||
"radius": False
|
||||
}
|
||||
@allure.feature("NAT MODE SPACIAL CONSISTENCY")
|
||||
@allure.parent_suite("SPACIAL CONSISTENCY")
|
||||
@allure.suite(suite_name="NAT MODE")
|
||||
@allure.sub_suite(sub_suite_name="WPA2_personal SPACIAL CONSISTENCY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class Test_SpatialConsistency_Bridge(object):
|
||||
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
@allure.title("Nat Mode Spacial Consistency Test (NSS-1) UDP-Download 2.4 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5052", name="WIFI-5052")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.nss1
|
||||
@pytest.mark.tarun1
|
||||
def test_udp_download_nss1_wpa2_personal_2g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT-WAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
station_names_twog = get_test_library.twog_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,passkey=security_key, mode=mode,
|
||||
band=band,num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:UDP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 1'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 100 380 480'],['attenuations2: 100 380 480'],['chamber: DUT-Chamber'], ['tt_deg: 0..+60..300']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_twog, mode=mode, download_rate="100%",
|
||||
instance_name="SPATIAL_NSS1_RVR1_TWOG", duration="60000",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name,
|
||||
pdf_name="Rate vs Range Test - UDP 2.4G")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
logging.info("Test Completed... Cleaning up Stations")
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 45, "medium": 35, "weak": 17}
|
||||
atn, deg = [10, 38, 48], [0, 60, 120, 180, 240, 300] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
logging.info("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
# start += 6
|
||||
print(thrpt_val, "\n", pass_fail)
|
||||
if "FAIL" in pass_fail:
|
||||
logging.info("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
logging.info("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
logging.info("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
logging.info("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
@allure.title("Nat Mode Spacial Consistency Test (NSS-2) UDP-Download 2.4 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5068", name="WIFI-5068")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.nss2
|
||||
def test_udp_download_nss2_wpa2_personal_2g(self,setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT-WAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
station_names_twog = get_test_library.twog_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security, passkey=security_key, mode=mode,
|
||||
band=band, num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:UDP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 100 380 480'], ['attenuations2: 100 380 480'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+60..300']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_twog, mode=mode, download_rate="100%",
|
||||
instance_name="SPATIAL_NSS2_RVR1_TWOG",duration="60000",vlan_id=vlan,
|
||||
dut_name=dut_name,raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name,
|
||||
pdf_name="Rate vs Range Test - UDP 2.4G")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
logging.info("Test Completed... Cleaning up Stations")
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 90, "medium": 70, "weak": 35}
|
||||
atn, deg = [10, 38, 48], [0, 60, 120, 180, 240, 300] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
logging.info("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
# start += 6
|
||||
print(thrpt_val, "\n", pass_fail)
|
||||
if "FAIL" in pass_fail:
|
||||
logging.info("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
logging.info("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
logging.info("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
logging.info("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
@allure.title("Nat Mode Spacial Consistency Test (NSS-1) UDP-Download 5 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5067", name="WIFI-5067")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.nss1
|
||||
@pytest.mark.tarun1
|
||||
def test_udp_download_nss1_wpa2_personal_5g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT-WAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
station_names_fiveg = get_test_library.fiveg_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,passkey=security_key, mode=mode,
|
||||
band=band,num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:UDP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 1'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 100 250 350'], ['attenuations2: 100 250 350'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+60..300']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_fiveg, mode=mode, download_rate="100%",
|
||||
instance_name="SPATIAL_NSS1_RVR1_FIVEG",duration="60000",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name,
|
||||
pdf_name="Rate vs Range Test - UDP 5G")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
logging.info("Test Completed... Cleaning up Stations")
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 250, "medium": 150, "weak": 75}
|
||||
atn, deg = [10, 25, 35], [0, 60, 120, 180, 240, 300] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
logging.info("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
# start += 6
|
||||
print(thrpt_val, "\n", pass_fail)
|
||||
if "FAIL" in pass_fail:
|
||||
logging.info("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
logging.info("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
logging.info("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
logging.info("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
@allure.title("Nat Mode Spacial Consistency Test (NSS-2) UDP-Download 5 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5066", name="WIFI-5066")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.nss2
|
||||
def test_udp_download_nss2_wpa2_personal_5g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "NAT-WAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
station_names_fiveg = get_test_library.fiveg_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,passkey=security_key, mode=mode,
|
||||
band=band,num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
print("station", station)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:UDP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])],
|
||||
['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 100 250 350'], ['attenuations2: 100 250 350'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+60..300']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_fiveg, mode=mode, download_rate="100%",
|
||||
instance_name="SPATIAL_NSS2_RVR1_FIVEG",duration="60000",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name,
|
||||
pdf_name="Rate vs Range Test - UDP 2.4G")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
logging.info("Test Completed... Cleaning up Stations")
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 500, "medium": 300, "weak": 150}
|
||||
atn, deg = [10, 25, 35], [0, 60, 120, 180, 240, 300] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
logging.info("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
# start += 6
|
||||
print(thrpt_val, "\n", pass_fail)
|
||||
if "FAIL" in pass_fail:
|
||||
logging.info("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
logging.info("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
logging.info("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
logging.info("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
"""
|
||||
|
||||
Test Spacial Consistency: Vlan Mode
|
||||
pytest -m spatial_consistency
|
||||
"""
|
||||
|
||||
import pytest
|
||||
import allure
|
||||
import logging
|
||||
import os
|
||||
|
||||
pytestmark = [pytest.mark.advance, pytest.mark.spatial_consistency, pytest.mark.bridge]
|
||||
|
||||
setup_params_general = {
|
||||
"mode": "VLAN",
|
||||
"ssid_modes": {
|
||||
"wpa2_personal": [
|
||||
{"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something", "vlan":100},
|
||||
{"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something", "vlan":100}
|
||||
]
|
||||
},
|
||||
"rf": {
|
||||
"5G":{
|
||||
"channel-width": 80},
|
||||
"2G":{
|
||||
"channel-width": 20}
|
||||
},
|
||||
"radius": False
|
||||
}
|
||||
@allure.feature("VLAN MODE SPACIAL CONSISTENCY")
|
||||
@allure.parent_suite("SPACIAL CONSISTENCY")
|
||||
@allure.suite(suite_name="VLAN MODE")
|
||||
@allure.sub_suite(sub_suite_name="WPA2_personal SPACIAL CONSISTENCY")
|
||||
@pytest.mark.parametrize(
|
||||
'setup_configuration',
|
||||
[setup_params_general],
|
||||
indirect=True,
|
||||
scope="class"
|
||||
)
|
||||
@pytest.mark.usefixtures("setup_configuration")
|
||||
class Test_SpatialConsistency_Bridge(object):
|
||||
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
@allure.title("Vlan Mode Spacial Consistency Test (NSS-1) UDP-Download 2.4 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5052", name="WIFI-5052")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.nss1
|
||||
@pytest.mark.tarun1
|
||||
def test_udp_download_nss1_wpa2_personal_2g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
station_names_twog = get_test_library.twog_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,passkey=security_key, mode=mode,
|
||||
band=band,num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:UDP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 1'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 100 380 480'],['attenuations2: 100 380 480'],['chamber: DUT-Chamber'], ['tt_deg: 0..+60..300']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_twog, mode=mode, download_rate="100%",
|
||||
instance_name="SPATIAL_NSS1_RVR1_TWOG", duration="60000",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name,
|
||||
pdf_name="Rate vs Range Test - UDP 2.4G")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
logging.info("Test Completed... Cleaning up Stations")
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 45, "medium": 35, "weak": 17}
|
||||
atn, deg = [10, 38, 48], [0, 60, 120, 180, 240, 300] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
logging.info("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
# start += 6
|
||||
print(thrpt_val, "\n", pass_fail)
|
||||
if "FAIL" in pass_fail:
|
||||
logging.info("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
logging.info("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
logging.info("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
logging.info("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@allure.story('wpa2_personal 2.4 GHZ Band')
|
||||
@allure.title("Vlan Mode Spacial Consistency Test (NSS-2) UDP-Download 2.4 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5068", name="WIFI-5068")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.twog
|
||||
@pytest.mark.nss2
|
||||
def test_udp_download_nss2_wpa2_personal_2g(self,setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_2g", "appliedRadios": ["2G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = 1
|
||||
station_names_twog = get_test_library.twog_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security, passkey=security_key, mode=mode,
|
||||
band=band, num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:UDP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 100 380 480'], ['attenuations2: 100 380 480'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+60..300']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_twog, mode=mode, download_rate="100%",
|
||||
instance_name="SPATIAL_NSS2_RVR1_TWOG",duration="60000",vlan_id=vlan,
|
||||
dut_name=dut_name,raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name,
|
||||
pdf_name="Rate vs Range Test - UDP 2.4G")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
logging.info("Test Completed... Cleaning up Stations")
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 90, "medium": 70, "weak": 35}
|
||||
atn, deg = [10, 38, 48], [0, 60, 120, 180, 240, 300] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
logging.info("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
# start += 6
|
||||
print(thrpt_val, "\n", pass_fail)
|
||||
if "FAIL" in pass_fail:
|
||||
logging.info("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
logging.info("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
logging.info("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
logging.info("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
@allure.title("Vlan Mode Spacial Consistency Test (NSS-1) UDP-Download 5 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5067", name="WIFI-5067")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.nss1
|
||||
@pytest.mark.tarun1
|
||||
def test_udp_download_nss1_wpa2_personal_5g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
station_names_fiveg = get_test_library.fiveg_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,passkey=security_key, mode=mode,
|
||||
band=band,num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:UDP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 1'], ['attenuator: ' + str(ser_no[0])], ['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 100 250 350'], ['attenuations2: 100 250 350'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+60..300']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_fiveg, mode=mode, download_rate="100%",
|
||||
instance_name="SPATIAL_NSS1_RVR1_FIVEG",duration="60000",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name,
|
||||
pdf_name="Rate vs Range Test - UDP 5G")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
logging.info("Test Completed... Cleaning up Stations")
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 250, "medium": 150, "weak": 75}
|
||||
atn, deg = [10, 25, 35], [0, 60, 120, 180, 240, 300] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
logging.info("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
# start += 6
|
||||
print(thrpt_val, "\n", pass_fail)
|
||||
if "FAIL" in pass_fail:
|
||||
logging.info("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
logging.info("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
logging.info("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
logging.info("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@allure.story('wpa2_personal 5 GHZ Band')
|
||||
@allure.title("Vlan Mode Spacial Consistency Test (NSS-2) UDP-Download 5 GHz Band")
|
||||
@allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-5066", name="WIFI-5066")
|
||||
@pytest.mark.wpa2_personal
|
||||
@pytest.mark.fiveg
|
||||
@pytest.mark.nss2
|
||||
def test_udp_download_nss2_wpa2_personal_5g(self, setup_configuration, get_test_library, num_stations,
|
||||
get_test_device_logs, get_dut_logs_per_test_case, check_connectivity):
|
||||
logging.info("Cleanup existing clients and traffic")
|
||||
chamber_view_obj, dut_name = get_test_library.chamber_view()
|
||||
get_test_library.client_disconnect(clean_l3_traffic=True)
|
||||
profile_data = {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"}
|
||||
ssid_name = profile_data["ssid_name"]
|
||||
security_key = profile_data["security_key"]
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "fiveg"
|
||||
vlan = 1
|
||||
station_names_fiveg = get_test_library.fiveg_prefix
|
||||
station = get_test_library.client_connect(ssid=ssid_name, security=security,passkey=security_key, mode=mode,
|
||||
band=band,num_sta=1, vlan_id=vlan, dut_data=setup_configuration)
|
||||
print("station", station)
|
||||
ser_no = get_test_library.attenuator_serial()
|
||||
print(ser_no)
|
||||
val = [['modes: Auto'], ['pkts: MTU'], ['directions: DUT Transmit'], ['traffic_types:UDP'],
|
||||
['bandw_options: AUTO'], ['spatial_streams: 2'], ['attenuator: ' + str(ser_no[0])],
|
||||
['attenuator2: ' + str(ser_no[1])],
|
||||
['attenuations: 100 250 350'], ['attenuations2: 100 250 350'], ['chamber: DUT-Chamber'], ['tt_deg: 0..+60..300']]
|
||||
if station:
|
||||
rvr_o = get_test_library.rate_vs_range_test(station_name=station_names_fiveg, mode=mode, download_rate="100%",
|
||||
instance_name="SPATIAL_NSS2_RVR1_FIVEG",duration="60000",vlan_id=vlan,
|
||||
dut_name=dut_name, raw_lines=val)
|
||||
report_name = rvr_o.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1]
|
||||
print("report name ", report_name)
|
||||
entries = os.listdir("../reports/" + report_name + '/')
|
||||
print("entries", entries)
|
||||
get_test_library.attach_report_graphs(report_name=report_name,
|
||||
pdf_name="Rate vs Range Test - UDP 2.4G")
|
||||
get_test_library.client_disconnect(clear_all_sta=True, clean_l3_traffic=True)
|
||||
logging.info("Test Completed... Cleaning up Stations")
|
||||
kpi = "kpi.csv"
|
||||
pass_value = {"strong": 500, "medium": 300, "weak": 150}
|
||||
atn, deg = [10, 25, 35], [0, 60, 120, 180, 240, 300] #
|
||||
if kpi in entries:
|
||||
kpi_val = get_test_library.read_kpi_file(column_name=["numeric-score"], dir_name=report_name)
|
||||
print(kpi_val)
|
||||
if str(kpi_val) == "empty":
|
||||
logging.info("Throughput value from kpi.csv is empty, Test failed")
|
||||
allure.attach(name="CSV Data", body="Throughput value from kpi.csv is empty, Test failed")
|
||||
assert False, "Throughput value from kpi.csv is empty, Test failed"
|
||||
else:
|
||||
allure.attach(name="CSV Data", body="Throughput value : " + str(kpi_val))
|
||||
start, thrpt_val, pass_fail = 0, {}, []
|
||||
for i in pass_value:
|
||||
count = 0
|
||||
for j in range(start, len(kpi_val), len(atn)):
|
||||
thrpt_val[f"{atn[start]}atn-{deg[count]}deg"] = kpi_val[j][0]
|
||||
if kpi_val[j][0] >= pass_value[i]:
|
||||
pass_fail.append("PASS")
|
||||
else:
|
||||
pass_fail.append("FAIL")
|
||||
count += 1
|
||||
# start += 6
|
||||
print(thrpt_val, "\n", pass_fail)
|
||||
if "FAIL" in pass_fail:
|
||||
logging.info("Test failed due to lesser value")
|
||||
assert False, "Test failed due to lesser value"
|
||||
else:
|
||||
logging.info("Test passed successfully")
|
||||
assert True
|
||||
else:
|
||||
logging.info("csv file does not exist, Test failed")
|
||||
allure.attach(name="CSV Data", body="csv file does not exist")
|
||||
assert False, "csv file does not exist"
|
||||
else:
|
||||
logging.info("Test failed due to no station ip")
|
||||
assert False, "Test failed due to no station ip"
|
||||
|
||||
@@ -20,5 +20,3 @@ def setup_configuration(request, get_markers, get_target_object, run_lf):
|
||||
requested_combination=requested_combination)
|
||||
logging.info("dut_data after config applied: " + str(data))
|
||||
yield data
|
||||
|
||||
|
||||
|
||||
@@ -446,4 +446,3 @@ class TestWifiCapacityBRIDGEMode6G(object):
|
||||
move_to_influx=False, dut_data=setup_configuration, ssid_name=ssid_name,
|
||||
num_stations={"6G": max_stations})
|
||||
assert True
|
||||
|
||||
|
||||
@@ -87,4 +87,3 @@ class TestDataplaneThroughputVLAN(object):
|
||||
influx_tags=influx_tags, move_to_influx=False,
|
||||
dut_data=setup_configuration
|
||||
)
|
||||
|
||||
|
||||
@@ -762,4 +762,3 @@ class TestCountryCA20Mhz2GChannel11(object):
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
|
||||
@@ -777,4 +777,3 @@ class TestCountryCA40Mhz2GChannel11(object):
|
||||
assert False
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -275,4 +275,3 @@ class TestCountryCA80Mhz5GChannel132(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
@@ -897,4 +897,3 @@ class TestCountryGB20Mhz2GChannel13(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
@@ -817,4 +817,3 @@ class TestCountryGB40Mhz5GChannel157(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
@@ -407,4 +407,3 @@ class TestCountryGB80Mhz5GChannel149(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
@@ -884,4 +884,3 @@ class TestCountryIN20Mhz2GChannel13(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
@@ -541,4 +541,3 @@ class TestCountryIN40Mhz5GChannel140(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
@@ -884,4 +884,3 @@ class TestCountryIN40Mhz2GChannel13(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
@@ -407,4 +407,3 @@ class TestCountryIN80Mhz5GChannel149(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
@@ -818,4 +818,3 @@ class TestCountryJP40Mhz5GChannel157(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
@@ -275,4 +275,3 @@ class TestCountryJP80Mhz5GChannel116(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
@@ -408,5 +408,3 @@ class TestCountryRU80Mhz5GChannel149(object):
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -408,5 +408,3 @@ class TestCountrySG80Mhz5GChannel149(object):
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1668,5 +1668,3 @@ class TestCountryUS20Mhz5GChannel165(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
|
||||
@@ -805,5 +805,3 @@ class TestCountryUS40Mhz5GChannel157(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
|
||||
@@ -407,4 +407,3 @@ class TestCountryUS80Mhz5GChannel149(object):
|
||||
assert True
|
||||
else:
|
||||
assert False
|
||||
|
||||
|
||||
@@ -485,5 +485,3 @@ class TestDynamicVlan5GWpa2(object):
|
||||
assert True, result
|
||||
elif not val:
|
||||
assert False, result
|
||||
|
||||
|
||||
|
||||
@@ -487,5 +487,3 @@ class TestDynamicVlan2GWpa2(object):
|
||||
assert True, result
|
||||
elif not val:
|
||||
assert False, result
|
||||
|
||||
|
||||
|
||||
@@ -479,5 +479,3 @@ class TestDynamicVlan5GWpa3(object):
|
||||
assert True, result
|
||||
elif not val:
|
||||
assert False, result
|
||||
|
||||
|
||||
|
||||
@@ -482,4 +482,3 @@ class TestDynamicVlan2GWpa3(object):
|
||||
elif not val:
|
||||
assert False, result
|
||||
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ class TestMultiVlan(object):
|
||||
security = "wpa2"
|
||||
mode = "VLAN"
|
||||
band = "twog"
|
||||
vlan = [200]
|
||||
vlan = [250]
|
||||
|
||||
passes, result = get_test_library.client_connectivity_test(ssid=ssid_name, security=security,
|
||||
dut_data=setup_configuration,
|
||||
@@ -176,3 +176,4 @@ class TestMultiVlan(object):
|
||||
passkey=security_key, mode=mode, band=band,
|
||||
num_sta=1, vlan_id=vlan)
|
||||
assert passes == "FAIL", result
|
||||
|
||||
|
||||
@@ -798,3 +798,4 @@ class TestRateLimitingVLAN(object):
|
||||
)
|
||||
|
||||
assert True
|
||||
|
||||
|
||||
@@ -327,4 +327,3 @@ class TestBridgeModeConnectSuiteTwo(object):
|
||||
ttls_passwd=ttls_passwd)
|
||||
|
||||
assert passes == "PASS", result
|
||||
|
||||
|
||||
@@ -244,4 +244,3 @@ class TestRateLimitingBridge(object):
|
||||
assert passes == "PASS", result
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -328,4 +328,3 @@ class TestVlanModeConnectSuiteTwo(object):
|
||||
ttls_passwd=ttls_passwd)
|
||||
|
||||
assert passes == "PASS", result
|
||||
|
||||
|
||||
@@ -248,4 +248,3 @@ class TestRateLimitingVlan(object):
|
||||
passes, result = get_test_library.rate_limiting_test(ssid_name=ssid_name, passkey=security_key, up_rate=up_rate,
|
||||
down_rate=down_rate)
|
||||
assert passes == "PASS", result
|
||||
|
||||
|
||||
@@ -382,3 +382,4 @@ class TestFirmwareUpgrade(object):
|
||||
allure.attach(name=str(data['firmware']) + str(current_version_ap), body="")
|
||||
status.append(current_version_ap == data['firmware'].split())
|
||||
assert False not in status
|
||||
|
||||
|
||||
Reference in New Issue
Block a user