Beispiel #1
0
    def test_ToogleWifiMode_2g_WPA2_Personal_BRIDGE(self, request, get_vif_state, get_ToggleWifiMode_data,
                                             setup_perfectoMobile_android):

        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][0]
        ssidName = profile_data["ssid_name"]
        ssidPassword = profile_data["security_key"]
        print("SSID_NAME: " + ssidName)
        print("SSID_PASS: "******"retest,vif state ssid not available:", body=str(get_vif_state))
            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")

        report = setup_perfectoMobile_android[1]
        driver = setup_perfectoMobile_android[0]
        connData = get_ToggleWifiMode_data

        # Set Wifi/AP Mode
        set_APconnMobileDevice_android(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData)

        # Toggle Wifi Mode
        assert Toggle_WifiMode_android(request, setup_perfectoMobile_android, ssidName, connData)

        # ForgetWifi
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName, connData)
    def test_ClientConnect_5g_OPEN(self, request, get_vif_state,
                                   get_APToMobileDevice_data,
                                   setup_perfectoMobile_android):

        profile_data = setup_params_general["ssid_modes"]["open"][0]
        ssidName = profile_data["ssid_name"]
        ssidPassword = "******"
        print("SSID_NAME: " + ssidName)
        print("SSID_PASS: "******"retest,vif state ssid not available:",
                          body=str(get_vif_state))
            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")

        report = setup_perfectoMobile_android[1]
        driver = setup_perfectoMobile_android[0]
        connData = get_APToMobileDevice_data

        # Set Wifi/AP Mode
        set_APconnMobileDevice_android(request, ssidName, ssidPassword,
                                       setup_perfectoMobile_android, connData)

        # Toggle AirplaneMode
        assert verifyUploadDownloadSpeed_android(request,
                                                 setup_perfectoMobile_android,
                                                 connData)

        # ForgetWifi
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName,
                             connData)
    def test_ClientConnectivity_5g_WPA2_Personal(self, request, get_vif_state,
                                                 get_APToMobileDevice_data,
                                                 setup_perfectoMobile_android):
        profile_data = setup_params_general["ssid_modes"]["wpa2_personal"][1]
        ssidName = profile_data["ssid_name"]
        ssidPassword = profile_data["security_key"]
        print("SSID_NAME: " + ssidName)
        print("SSID_PASS: "******"retest,vif state ssid not available:",
                          body=str(get_vif_state))
            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")

        report = setup_perfectoMobile_android[1]
        driver = setup_perfectoMobile_android[0]
        connData = get_APToMobileDevice_data

        #Set Wifi/AP Mode
        set_APconnMobileDevice_android(request, ssidName, ssidPassword,
                                       setup_perfectoMobile_android, connData)

        #Verify Upload download Speed from device Selection
        assert verifyUploadDownloadSpeed_android(request,
                                                 setup_perfectoMobile_android,
                                                 connData)

        #ForgetWifi
        ForgetWifiConnection(request, setup_perfectoMobile_android, ssidName,
                             connData)
    def test_OpenRoaming_2g_WPA2_EAP(self, passpoint_profile_info,
                                     push_ap_profile, request,
                                     get_APToMobileDevice_data,
                                     setup_perfectoMobile_android):
        """
            EAP Passpoint BRIDGE Mode
            pytest -m "interop_iOS and eap_passpoint and bridge and wpa2_eap and twog"
        """

        result = push_ap_profile['ssid_wpa2_eap_passpoint_2g']['vif_config']
        print(result)
        if result:
            allure.attach(
                name=
                "Config push to AP for ssid_wpa2_eap_passpoint_2g successful ",
                body="")
        else:
            allure.attach(
                name="Config push to AP for ssid_wpa2_eap_passpoint_2g failed",
                body="")
            pytest.xfail("SSID NOT AVAILABLE IN VIF STATE")
        assert result
        result = push_ap_profile['ssid_wpa2_eap_passpoint_2g']['vif_state']
        if result:
            allure.attach(
                name=
                "Config apply to AP for ssid_wpa2_eap_passpoint_2g successful ",
                body="")
        else:
            allure.attach(
                name="Config apply to AP for ssid_wpa2_eap_passpoint_2g failed",
                body="")
        assert result

        print("SSID to download profile :: ",
              setup_params_eap["ssid_modes"]["open"][0]["ssid_name"])
        print("SSID to validate connectivity :: ",
              setup_params_eap["ssid_modes"]["wpa2_eap"][0]["ssid_name"])
        print("Profile download URL :: ",
              passpoint_profile_info["profile_download_url_ios"])
        print("Profile name to remove :: ",
              passpoint_profile_info["profile_name_on_device"])

        #SSID to download profile ::  passpoint_profile_download
        #SSID to validate connectivity ::  ssid_wpa2_eap_passpoint_5g
        #Profile download URL ::  https://onboard.almondlabs.net/ios.html
        #Profile name to remove ::  AmeriBand

        report = setup_perfectoMobile_android[1]
        driver = setup_perfectoMobile_android[0]
        connData = get_APToMobileDevice_data

        downloadProfileSSID = setup_params_eap["ssid_modes"]["open"][0][
            "ssid_name"]
        downloadProfileSSIDPass = ""
        profileDownloadURL = "https://onboard.almondlabs.net/ttls/androidconfig.cfg"
        profileName = passpoint_profile_info["profile_name_on_device"]
        profileNameSSID = setup_params_eap["ssid_modes"]["wpa2_eap"][1][
            "ssid_name"]

        #Delete Profile Under Settings
        deleteOpenRoamingInstalledProfile(request, profileName,
                                          setup_perfectoMobile_android,
                                          connData)

        #Set Wifi/AP Mode
        set_APconnMobileDevice_android(request, downloadProfileSSID,
                                       downloadProfileSSIDPass,
                                       setup_perfectoMobile_android, connData)

        #Install Profile
        downloadInstallOpenRoamingProfile(request, profileDownloadURL,
                                          setup_perfectoMobile_android,
                                          connData)

        #ForgetWifi Original
        ForgetWifiConnection(request, setup_perfectoMobile_android,
                             downloadProfileSSID, connData)

        try:
            verify_APconnMobileDevice_Android(request, profileNameSSID,
                                              setup_perfectoMobile_android,
                                              connData)
            #Verify Upload download Speed from device Selection
            verifyUploadDownloadSpeed_android(request,
                                              setup_perfectoMobile_android,
                                              connData)

        except Exception as e:
            deleteOpenRoamingInstalledProfile(request, profileName,
                                              setup_perfectoMobile_android,
                                              connData)
            assert False

        #Delete Profile Under Settings
        deleteOpenRoamingInstalledProfile(request, profileName,
                                          setup_perfectoMobile_android,
                                          connData)