Files
wlan-testing/tests/e2e/basic
Jitendrakumar Kushavah 98e67832aa Merged WIFI-7 branches (#1053)
* Added sanity marker for 6g test cases

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Add logic for better error handling

* Add detailed error logging

* Add fix for broken Dynamic VLAN 6GHz test cases

* Configured channel mode to EHT for wifi7

* Removed sercomm_ap72tip and Added sonicfi_rap7110c-341x AP in the sanity, performance and regression workflows

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Replaced HE mode with EHT mode for the AP config

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Increased sleep time after config push

* Replaced 2g test case with 5g test case in the sanity suite

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Swapped the testbed basic-4a and basic-5a

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Increased the sleep time after the config push

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Update sleep time for all interfaces to come up

* Removed sonicfi_rap7110c-341x AP from basic-4 and added it in advanced-2 testbed

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Updated the DFS path for WiFi 7 APs

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Add BE capacity tests and BE client scale tests

* Rename client_scale tests into ax_client_scale tests

* Rename client_scale_tests into ax_client_scale_tests

* Remove bidirectional tests from ax_client_scale tests

* Add configuraion data

* Provide pass fail criteria for 2G 2x2 40MHz

* Modified the marker name

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Added be_client_scale_tests, wifi_capacity_be_tests and  ax_client_scale_tests for new performance suite

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Increased the wait time after config push

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Added the ax capacity marker

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Change upload and download rate for BE client scale

* Added pass fail values for BE mode

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Modified the markers for the test cases

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Added be mode pass fail

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Added pass-fail values for 6g 2x2 160MHz

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Added pass-fail values for 6g 2x2 160MHz

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Replaced basic-4a with adv-2a

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Add Multiband testcases

* Add multi_band_tests marker

* Replaced dual band with multi band test

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>

* Update sleep time after config push

* Update sleep time after config push

* ADD EMPSK 6G testcase

* Update dataplane tests

* Modified the namespace name for sonicfi_rap630c-311g

Signed-off-by: jitendra-kushavah <jitendra.kushavah@candelatech.com>

* Replaced advanced-2a with advanced-2c

Signed-off-by: jitendra-kushavah <jitendra.kushavah@candelatech.com>

* Replaced advanced-2a with advanced-2c

Signed-off-by: jitendra-kushavah <jitendra.kushavah@candelatech.com>

* Updated code as per master

Signed-off-by: jitendra-kushavah <jitendra.kushavah@candelatech.com>

* Replaced advanced-2c with basic-5b

Signed-off-by: jitendra-kushavah <jitendra.kushavah@candelatech.com>

* Added jsonschema module

Signed-off-by: jitendra-kushavah <jitendra.kushavah@candelatech.com>

* Replace basic-5b with advanced-2c

* Add EAP112 & OAP103-BR to all automation workflows

* Add EAP112 & OAP103-BR to all automation workflows

* Update workflows

* Update workflows

* Add CIG189H in workflows

* Add CIG189H to performance workflow and add pass/fail criteria for performance testing

* Add CIG189H in AP models in a workflow

* Add Advance Captive Portal testcases on 5GHz and 6GHz

* Change sonicfi-rap7110c-341x AP from advance-2c to basic-4a in sanity and regression workflows

* Modify the namespace name for sonicfi_rap7110c-341x

* Update logic to assign channel mode in controller.py

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Update performance workflow and add sanity marker to a be_capacity test

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Add pass fail criteria for perforamnce for CIG189H AP

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Added sets parameter to enable the UDP-Burst,UDP-GRO and Multiple Endpoints options

Signed-off-by: jitendra-kushavah <jitendra.kushavah@candelatech.com>

* Remove regression marker from EMPSK testcase

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Update DFS path for the EAP112 AP

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Update pass fail criteria for CIG189H AP for AX mode

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Update pass fail criteria for cig189h AP

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Modify tedtbed from basic-4a to basic-5a for cig_wf189 AP in sanity workflow

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Update dfs path for WIFI7 AP

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Update dfs path

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Update EMPSK test case

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Enable 320MHz from client side for EMPSK test case

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Add EMPSK test case into sanity test suite

* Remove EMPSK from sanity

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Fix typos: replaced wap with wpa encryption

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Update EMPSK testcase

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Update the testbed name for sonicfi_rap7110c-341x AP to basic-4a in performance workflow

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Update radio config for DFS testcases

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Update DFS testcase to verify configured channel

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

* Add get_dut_logs_per_test_case and get_test_device_logs fixtures to multiband testcases

Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>

---------

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
Signed-off-by: jitendra-kushavah <jitendra.kushavah@candelatech.com>
Signed-off-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>
Co-authored-by: bhargavi-mamidipaka <bhargavi.mamidipaka@candelatech.com>
Co-authored-by: bhargavi-ct <bhargavimamidipaka@candelatech.com>
2025-06-27 10:40:42 +05:30
..
2025-06-27 10:40:42 +05:30
2023-04-24 14:44:17 +05:30
2024-07-18 16:18:07 +05:30
2023-09-26 18:54:28 +05:30
2021-04-12 23:05:22 +05:30

wlan-testing framework Information

e2e/basic

Basic test environment has 1 Access Point, 1 Cloud Controller, and 1 Candela LANforge Unit.

Setup

There are 3 different Configuration Modes in an Access Point

  1. Bridge
  2. NAT
  3. VLAN

####Any one mode of setup can be done in an Access Point at a time.

Within each mode, n number of SSID's can be provisioned from the controller to the AP

setup will take the inputs from the Test cases

Test cases can be bunched on a

  1. class level (have a module/ test_xx.py , have one or more classes, do setup once for each class)
  2. function level (have a module/ test_xx.py , have one or more functions, do setup once for each function)

Use the below sample template for starting to write test cases in basic

SAMPLE Test Case Example:

test_featureA_bridge.py

import pytest
import allure

# Module level Marking
pytestmark = [pytest.mark.usefixtures("setup_test_run"), pytest.mark.featureA]

# It is compulsory to put pytest.mark.usefixtures("setup_test_run")   in module level marking

profile_config = {
    "mode": "NAT",      # Mode of config ("BRIDGE"/"NAT"/"VLAN")
    
    # SSID modes and its Config: Enter the json data structure in the below format for test cases
    "ssid_modes": {
        # Enter the ssid modes:
        # (open/wpa/wpa2_personal/wpa3_personal/wpa3_personal_mixed/wpa_wpa2_personal_mixed/
        #  wpa_enterprise/wpa2_enterprise/wpa3_enterprise/wpa_wpa2_enterprise_mixed/wpa3_enterprise_mixed
        #  /wep)
        # Each security type can have multiple ssid config placed in a list and is customizable
        "wpa": [
            {"ssid_name": "ssid_wpa_eap_2g", "appliedRadios": ["is2dot4GHz"], "vlan": 1 },
            {"ssid_name": "ssid_wpa_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}],
        "wpa2_personal": [
            {"ssid_name": "ssid_wpa2_eap_2g", "appliedRadios": ["is2dot4GHz"]},
            {"ssid_name": "ssid_wpa2_eap_5g", "appliedRadios": ["is5GHzU", "is5GHz", "is5GHzL"]}]
    },
    # rf config data that is need to be pushed, 
    # Leave Blank for default (default config is taken from configuration.py for the selected testbed and AP Model)
    "rf": {},
    # True if you want to create a Radius Profile(Radius config by default is taken from configuration.py)
    "radius": True
}


# Class level Marking
@pytest.mark.suite_a
@pytest.mark.parametrize(
    'setup_configuration',   # Name of the fixture
    [profile_config],   # Passing the above static profile_config data for setup for tests in this class
    indirect=True,
    scope="class"       # Scope of the fixture (Its experimental for current framework (keep it "class" for default scenario))
)
@pytest.mark.usefixtures("setup_configuration")
class TestFeatureABridge(object):

    @pytest.mark.wpa        # Marker for the wifi encryption needed - Compulsory
    @pytest.mark.twog       # Marker for band (twog/fiveg) - Compulsory
    def test_client_wpa_2g(self):
        profile_data = profile_config["ssid_modes"]["wpa"][0]
        ssid_name = profile_data["ssid_name"]
        security_key = profile_data["security_key"]
        security = "wpa"
        mode = "BRIDGE"
        band = "twog"  # refer to appliedRadios in ssid_modes config   (twog/fiveg)
        #        vlan = 1        # 1 for "BRIDGE"/"NAT"  # Can be customised in the ssid config json
        
        # Write Your test case Here
        # Some Recommendations: 
        #        If your test case has components that are to be used by other test case,
        #        then make it library and call its instance from fixture.
        #        If your test case has some reports, then attach it as an allure report
        
        allure.attach(name="Test case report", body="Test case result description") # Check its usages for more detail
        
        PASS_FAIL_CONDITION = True
        assert PASS_FAIL_CONDITION

    @pytest.mark.wpa
    @pytest.mark.fiveg
    def test_client_wpa_5g(self):
        profile_data = profile_config["ssid_modes"]["wpa"][1]
        ssid_name = profile_data["ssid_name"]
        security_key = profile_data["security_key"]
        security = "wpa"
        mode = "BRIDGE"
        band = "fiveg"  # refer to appliedRadios in ssid_modes config   (twog/fiveg)
        vlan = 1        # 1 for "BRIDGE"/"NAT"  # Can be customised in the ssid config json
        
        # Write Your test case Here
        # Some Recommendations: 
        #        If your test case has components that are to be used by other test case,
        #        then make it library and call its instance from fixture.
        #        If your test case has some reports, then attach it as an allure report
        
        allure.attach(name="Test case report", body="Test case result description") # Check its usages for more detail
        
        PASS_FAIL_CONDITION = True
        assert PASS_FAIL_CONDITION
    
    @pytest.mark.wpa2_personal        # Marker for the wifi encryption needed - Compulsory
    @pytest.mark.twog       # Marker for band (twog/fiveg) - Compulsory
    def test_client_wpa2_personal_2g(self):
        profile_data = profile_config["ssid_modes"]["wpa2_personal"][0]
        ssid_name = profile_data["ssid_name"]
        security_key = profile_data["security_key"]
        security = "wpa2"
        mode = "BRIDGE"
        band = "twog"  # refer to appliedRadios in ssid_modes config   (twog/fiveg)
        #        vlan = 1        # 1 for "BRIDGE"/"NAT"  # Can be customised in the ssid config json
        
        # Write Your test case Here
        # Some Recommendations: 
        #        If your test case has components that are to be used by other test case,
        #        then make it library and call its instance from fixture.
        #        If your test case has some reports, then attach it as an allure report
        
        allure.attach(name="Test case report", body="Test case result description") # Check its usages for more detail
        
        PASS_FAIL_CONDITION = True
        assert PASS_FAIL_CONDITION

    @pytest.mark.wpa2_personal
    @pytest.mark.fiveg
    def test_client_wpa2_personal_5g(self):
        profile_data = profile_config["ssid_modes"]["wpa2_personal"][1]
        ssid_name = profile_data["ssid_name"]
        security_key = profile_data["security_key"]
        security = "wpa2"
        mode = "BRIDGE"
        band = "fiveg"  # refer to appliedRadios in ssid_modes config   (twog/fiveg)
        vlan = 1        # 1 for "BRIDGE"/"NAT"  # Can be customised in the ssid config json
        
        # Write Your test case Here
        # Some Recommendations: 
        #        If your test case has components that are to be used by other test case,
        #        then make it library and call its instance from fixture.
        #        If your test case has some reports, then attach it as an allure report
        
        allure.attach(name="Test case report", body="Test case result description") # Check its usages for more detail
        
        PASS_FAIL_CONDITION = True
        assert PASS_FAIL_CONDITION

    



##General Guardrails:

setup_profile is a Fixture that collects markers 
from the test case to decide which security modes and band is need to be applied on the Access Point

Test cases can be selected based upon the markers 

# This selection will push all the config for the above scenario, considering that you have specified all required markers
pytest -m featureA

# This selection will select only wpa test cases and will push the config for wpa mode only because wpa2_personal marker is not selected
pytest -m "featureA and wpa"

Conclusion: Security modes for SSID has some specific markers which are specified as follows

open/wpa/wpa2_personal/wpa3_personal/wpa3_personal_mixed/wpa_wpa2_personal_mixed
wpa_enterprise/wpa2_enterprise/wpa3_enterprise/wpa_wpa2_enterprise_mixed/wpa3_enterprise_mixed/wep

and for band, its (twog/fiveg)

if you don't specifi the marker, then no matter what profile_config you are passing to setup_profile fixture,
it will not be pushed

Refer other test cases for more reference



If you have special Config requirements for test case, then reach out to Shivam Thakur on Slack, or email (shivam.thakur@candelatech.com)