From aeaa38fbc9fbd719f7fb484ed946965faca9f159 Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Tue, 5 Apr 2022 05:51:43 +0530 Subject: [PATCH 01/14] fixed the channels Signed-off-by: Jyothsna-setti --- .../client_connectivity/test_general_security_modes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py index 2075d181e87..078f141ea15 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py @@ -48,6 +48,7 @@ class TestBridgeModeConnectivitySuiteA(object): @pytest.mark.open @pytest.mark.twog + @pytest.mark.hari @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2809", name="JIRA LINK") def test_open_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, lf_test, update_report, From e51b1d0e7f3f5f02a74ebed1165ee6cb85ff077b Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Tue, 5 Apr 2022 10:13:59 +0530 Subject: [PATCH 02/14] channels fixed Signed-off-by: Jyothsna-setti --- .github/actions/run-tests/action.yml | 4 +- .github/workflows/ow_docker-compose.yml | 72 +++++-- .github/workflows/quali-advanced.yml | 8 + .github/workflows/quali.yml | 72 +++++++ .../workflows/test-ucentral-deployment.yaml | 11 +- .github/workflows/uc_loadsim.yml | 53 +++-- .../workflows/ucentralgw-dev-deployment.yaml | 7 +- .../workflows/ucentralgw-qa-deployment.yaml | 9 +- .github/workflows/update-badges.yml | 4 +- README.md | 4 +- docker-compose/openwifi/deploy.sh | 31 ++- helm/ucentral/deploy.sh | 36 +++- .../values.ucentral-qa.separate-lbs.yaml | 38 ++-- .../values.ucentral-qa.test-nodes.yaml | 2 +- helm/ucentral/values.ucentral-qa.yaml | 183 ++++++++++++++++-- libs/controller/controller_2x/controller.py | 16 +- .../dfs_20MHz/test_dfs_20_bridge.py | 180 +++++++++++------ .../dfs_40MHz/test_dfs_40_bridge.py | 76 +++++--- .../dfs_80MHz/test_dfs_80_bridge.py | 45 +++-- .../test_enterprise_tls.py | 32 +-- .../test_general_security_modes.py | 72 ++----- .../test_enterprise_tls.py | 32 +-- .../test_enterprise_ttls.py | 30 +-- .../test_general_security_modes.py | 72 ++----- .../test_general_security_modes.py | 72 ++----- .../iOS/test_general_security_modes.py | 83 ++++++++ .../android/test_general_security_modes.py | 12 +- .../iOS/test_general_security_mode.py | 12 +- tests/fixtures_2x.py | 8 +- 29 files changed, 816 insertions(+), 460 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 353f0a51d45..16d8f001b47 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -144,14 +144,14 @@ runs: exit $EXIT_CODE - name: upload Allure results as artifact - if: ${{ always() }} + if: always() uses: actions/upload-artifact@v2 with: name: ${{ inputs.allure_results_artifact_name }} path: allure-results - name: cleanup - if: ${{ always() }} + if: always() shell: bash run: | kubectl delete ns "${{ inputs.namespace }}" --wait=true diff --git a/.github/workflows/ow_docker-compose.yml b/.github/workflows/ow_docker-compose.yml index 902d8c22f03..e2b4f9c07d3 100644 --- a/.github/workflows/ow_docker-compose.yml +++ b/.github/workflows/ow_docker-compose.yml @@ -17,10 +17,6 @@ on: default: 'master' description: 'OpenWIFI Gateway version to be deployed.' required: false - owgwui_version: - default: 'main' - description: 'OpenWIFI Web UI version to be deployed.' - required: false owsec_version: default: 'main' description: 'OpenWIFI Security version to be deployed.' @@ -33,9 +29,13 @@ on: default: 'main' description: 'OpenWIFI Provisioning version to be deployed.' required: false - owprovui_version: + owanalytics_version: + default: 'main' + description: 'OpenWIFI Analytics version to be deployed.' + required: false + owsub_version: default: 'main' - description: 'OpenWIFI Provisioning Web UI version to be deployed.' + description: 'OpenWIFI Subscription (Userportal) version to be deployed.' required: false id: description: 'run identifier' @@ -110,7 +110,6 @@ jobs: - name: Deploy OpenWIFI Cloud SDK working-directory: wlan-testing/docker-compose/openwifi env: - RTTY_TOKEN: ${{ secrets.RTTY_TOKEN }} OWSEC_AUTHENTICATION_DEFAULT_USERNAME: ${{ secrets.UCENTRALGW_AUTH_USERNAME }} OWSEC_AUTHENTICATION_DEFAULT_PASSWORD: ${{ secrets.UCENTRALGW_AUTH_PASSWORD }} OWFMS_S3_SECRET: ${{ secrets.UCENTRALFMS_S3_SECRET }} @@ -127,7 +126,7 @@ jobs: external-dns.alpha.kubernetes.io/hostname: ow-docker-compose-${{ github.run_id }}.cicd.lab.wlan.tip.build service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285" - service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16002,16003,443,16001,16004,16005,8443,5912,5913" + service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16002,16003,443,16001,16004,16005,8443,5912,5913,16009,16006" labels: app: ow-docker-compose-${{ github.run_id }} spec: @@ -151,6 +150,13 @@ jobs: port: 16003 targetPort: 16003 protocol: TCP + - name: owgw-rttys + port: 5912 + targetPort: 5912 + protocol: TCP + - name: owgw-rttys-view + port: 5913 + targetPort: 5913 - name: owgw-ui-http port: 80 targetPort: 80 @@ -158,6 +164,7 @@ jobs: - name: owgw-ui-https port: 443 targetPort: 443 + protocol: TCP - name: owsec-restapi port: 16001 targetPort: 16001 @@ -165,6 +172,7 @@ jobs: - name: owsec-alivecheck port: 16101 targetPort: 16101 + protocol: TCP - name: owfms-restapi port: 16004 targetPort: 16004 @@ -172,6 +180,7 @@ jobs: - name: owfms-alivecheck port: 16104 targetPort: 16104 + protocol: TCP - name: owprov-restapi port: 16005 targetPort: 16005 @@ -179,6 +188,7 @@ jobs: - name: owprov-alivecheck port: 16105 targetPort: 16105 + protocol: TCP - name: owprov-ui-http port: 8080 targetPort: 8080 @@ -186,13 +196,23 @@ jobs: - name: owprov-ui-https port: 8443 targetPort: 8443 - - name: rttys-dev - port: 5912 - targetPort: 5912 protocol: TCP - - name: rttys-user - port: 5913 - targetPort: 5913 + - name: owanalytics-restapi + port: 16009 + targetPort: 16009 + protocol: TCP + - name: owanalytics-alivecheck + port: 16109 + targetPort: 16109 + protocol: TCP + - name: owsub-restapi + port: 16006 + targetPort: 16006 + protocol: TCP + - name: owsub-alivecheck + port: 16106 + targetPort: 16106 + protocol: TCP --- apiVersion: v1 kind: Pod @@ -241,7 +261,7 @@ jobs: - name: OWGW_TAG value: "${{ github.event.inputs.owgw_version }}" - name: OWGWUI_TAG - value: "${{ github.event.inputs.owgwui_version }}" + value: "main" - name: OWSEC_TAG value: "${{ github.event.inputs.owsec_version }}" - name: OWFMS_TAG @@ -249,7 +269,11 @@ jobs: - name: OWPROV_TAG value: "${{ github.event.inputs.owprov_version }}" - name: OWPROVUI_TAG - value: "${{ github.event.inputs.owprovui_version }}" + value: "main" + - name: OWANALYTICS_TAG + value: "${{ github.event.inputs.owanalytics_version }}" + - name: OWSUB_TAG + value: "${{ github.event.inputs.owsub_version }}" - name: INTERNAL_OWGW_HOSTNAME value: "owgw.wlan.local" - name: INTERNAL_OWSEC_HOSTNAME @@ -258,12 +282,14 @@ jobs: value: "owfms.wlan.local" - name: INTERNAL_OWPROV_HOSTNAME value: "owprov.wlan.local" + - name: INTERNAL_OWANALYTICS_HOSTNAME + value: "owanalytics.wlan.local" + - name: INTERNAL_OWSUB_HOSTNAME + value: "owsub.wlan.local" - name: SYSTEM_URI_UI value: "https://ow-docker-compose-${{ github.run_id }}.cicd.lab.wlan.tip.build" - name: DEFAULT_UCENTRALSEC_URL value: "https://ow-docker-compose-${{ github.run_id }}.cicd.lab.wlan.tip.build:16001" - - name: RTTY_TOKEN - value: "$RTTY_TOKEN" - name: OWGW_FILEUPLOADER_HOST_NAME value: "ow-docker-compose-${{ github.run_id }}.cicd.lab.wlan.tip.build" - name: OWGW_FILEUPLOADER_URI @@ -294,6 +320,14 @@ jobs: value: "https://owprov.wlan.local:17005" - name: OWPROV_SYSTEM_URI_PUBLIC value: "https://ow-docker-compose-${{ github.run_id }}.cicd.lab.wlan.tip.build:16005" + - name: OWANALYTICS_SYSTEM_URI_PRIVATE + value: "https://owanalytics.wlan.local:17009" + - name: OWANALYTICS_SYSTEM_URI_PUBLIC + value: "https://ow-docker-compose-${{ github.run_id }}.cicd.lab.wlan.tip.build:16009" + - name: OWSUB_SYSTEM_URI_PRIVATE + value: "https://owsub.wlan.local:17006" + - name: OWSUB_SYSTEM_URI_PUBLIC + value: "https://ow-docker-compose-${{ github.run_id }}.cicd.lab.wlan.tip.build:16006" - name: WEBSOCKET_CERT value: "/tip-cicd-wildcard-certs/websocket-cert.pem" - name: WEBSOCKET_KEY @@ -328,12 +362,14 @@ jobs: OWSEC_DEFAULT_USERNAME: ${{ secrets.OWSEC_DEFAULT_USERNAME }} OWSEC_DEFAULT_PASSWORD: ${{ secrets.OWSEC_DEFAULT_PASSWORD }} OWSEC_NEW_PASSWORD: ${{ secrets.OWSEC_NEW_PASSWORD }} + CHECK_RETRIES: 60 run: | docker run --rm \ -e OWSEC \ -e OWSEC_DEFAULT_USERNAME \ -e OWSEC_DEFAULT_PASSWORD \ -e OWSEC_NEW_PASSWORD \ + -e CHECK_RETRIES \ tip-tip-wlan-cloud-ucentral.jfrog.io/clustersysteminfo:main deploy-virtual-ap-instance: diff --git a/.github/workflows/quali-advanced.yml b/.github/workflows/quali-advanced.yml index d3e6386e2a8..7ccff722844 100644 --- a/.github/workflows/quali-advanced.yml +++ b/.github/workflows/quali-advanced.yml @@ -170,6 +170,14 @@ jobs: if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsec + - name: show analytics logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/analytics + + - name: show subscription (userportal) logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsub + - name: stop reservation if: always() run: python .quali/stop_reservation.py ${{ steps.reservation.outputs.identifier }} diff --git a/.github/workflows/quali.yml b/.github/workflows/quali.yml index 9235da64fd3..24e49448976 100644 --- a/.github/workflows/quali.yml +++ b/.github/workflows/quali.yml @@ -169,6 +169,14 @@ jobs: if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owprov + - name: show analytics logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owanalytics + + - name: show subscription (userportal) logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsub + - name: show sec logs if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsec @@ -270,6 +278,14 @@ jobs: if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owprov + - name: show analytics logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owanalytics + + - name: show subscription (userportal) logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsub + - name: show sec logs if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsec @@ -371,6 +387,14 @@ jobs: if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owprov + - name: show analytics logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owanalytics + + - name: show subscription (userportal) logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsub + - name: show sec logs if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsec @@ -472,6 +496,14 @@ jobs: if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owprov + - name: show analytics logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owanalytics + + - name: show subscription (userportal) logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsub + - name: show sec logs if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsec @@ -573,6 +605,14 @@ jobs: if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owprov + - name: show analytics logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owanalytics + + - name: show subscription (userportal) logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsub + - name: show sec logs if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsec @@ -674,6 +714,14 @@ jobs: if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owprov + - name: show analytics logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owanalytics + + - name: show subscription (userportal) logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsub + - name: show sec logs if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsec @@ -775,6 +823,14 @@ jobs: if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owprov + - name: show analytics logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owanalytics + + - name: show subscription (userportal) logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsub + - name: show sec logs if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsec @@ -876,6 +932,14 @@ jobs: if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owprov + - name: show analytics logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owanalytics + + - name: show subscription (userportal) logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsub + - name: show sec logs if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsec @@ -977,6 +1041,14 @@ jobs: if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owprov + - name: show analytics logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owanalytics + + - name: show subscription (userportal) logs + if: failure() + run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsub + - name: show sec logs if: failure() run: kubectl -n openwifi-${{ steps.reservation.outputs.namespace }} logs deployment/owsec diff --git a/.github/workflows/test-ucentral-deployment.yaml b/.github/workflows/test-ucentral-deployment.yaml index 3df73767292..786a2de640b 100644 --- a/.github/workflows/test-ucentral-deployment.yaml +++ b/.github/workflows/test-ucentral-deployment.yaml @@ -51,6 +51,14 @@ on: default: 'main' description: 'OpenWIFI Provisioning Web UI version to be deployed (git tag or helm package version may be used, main is default)' required: true + owanalytics_version: + default: 'main' + description: 'OpenWIFI Analytics version to be deployed (git tag or helm package version may be used, main is default)' + required: true + owsub_version: + default: 'main' + description: 'OpenWIFI Subscription (Userportal) version to be deployed (git tag or helm package version may be used, main is default)' + required: true jobs: deploy: @@ -85,8 +93,9 @@ jobs: export OWFMS_VERSION=${{ github.event.inputs.owfms_version }} export OWPROV_VERSION=${{ github.event.inputs.owprov_version }} export OWPROVUI_VERSION=${{ github.event.inputs.owprovui_version }} + export OWANALYTICS_VERSION=${{ github.event.inputs.owanalytics_version }} + export OWSUB_VERSION=${{ github.event.inputs.owsub_version }} export VALUES_FILE_LOCATION=values.ucentral-qa.yaml - export RTTY_TOKEN=${{ secrets.RTTY_TOKEN }} export OWGW_AUTH_USERNAME=${{ secrets.UCENTRALGW_AUTH_USERNAME }} export OWGW_AUTH_PASSWORD=${{ secrets.UCENTRALGW_AUTH_PASSWORD }} export OWFMS_S3_SECRET=${{ secrets.UCENTRALFMS_S3_SECRET }} diff --git a/.github/workflows/uc_loadsim.yml b/.github/workflows/uc_loadsim.yml index 50edb411732..a852cfb8117 100644 --- a/.github/workflows/uc_loadsim.yml +++ b/.github/workflows/uc_loadsim.yml @@ -81,8 +81,9 @@ jobs: export OWFMS_VERSION=main export OWPROV_VERSION=main export OWPROVUI_VERSION=main + export OWANALYTICS_VERSION=main + export OWSUB_VERSION=main export VALUES_FILE_LOCATION=values.ucentral-qa.yaml,values.ucentral-qa.test-nodes.yaml,values.ucentral-qa.owls-enabled.yaml - export RTTY_TOKEN=${{ secrets.RTTY_TOKEN }} export OWGW_AUTH_USERNAME=${{ secrets.UCENTRALGW_AUTH_USERNAME }} export OWGW_AUTH_PASSWORD=${{ secrets.UCENTRALGW_AUTH_PASSWORD }} export OWFMS_S3_SECRET=${{ secrets.UCENTRALFMS_S3_SECRET }} @@ -367,7 +368,6 @@ jobs: - name: Deploy CloudSDK using Docker-compose working-directory: wlan-testing/docker-compose/openwifi env: - RTTY_TOKEN: ${{ secrets.RTTY_TOKEN }} OWSEC_AUTHENTICATION_DEFAULT_USERNAME: ${{ secrets.UCENTRALGW_AUTH_USERNAME }} OWSEC_AUTHENTICATION_DEFAULT_PASSWORD: ${{ secrets.UCENTRALGW_AUTH_PASSWORD }} OWFMS_S3_SECRET: ${{ secrets.UCENTRALFMS_S3_SECRET }} @@ -384,7 +384,7 @@ jobs: external-dns.alpha.kubernetes.io/hostname: ${{ steps.cloudsdk.outputs.url }} service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285" - service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16002,16003,443,16001,16004,16005,8443,5912,5913" + service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16002,16003,443,16001,16004,16005,8443,5912,5913,16009,16006" labels: app: cloudsdk spec: @@ -408,6 +408,13 @@ jobs: port: 16003 targetPort: 16003 protocol: TCP + - name: owgw-rttys + port: 5912 + targetPort: 5912 + protocol: TCP + - name: owgw-rttys-view + port: 5913 + targetPort: 5913 - name: owgw-ui-http port: 80 targetPort: 80 @@ -415,6 +422,7 @@ jobs: - name: owgw-ui-https port: 443 targetPort: 443 + protocol: TCP - name: owsec-restapi port: 16001 targetPort: 16001 @@ -422,6 +430,7 @@ jobs: - name: owsec-alivecheck port: 16101 targetPort: 16101 + protocol: TCP - name: owfms-restapi port: 16004 targetPort: 16004 @@ -429,6 +438,7 @@ jobs: - name: owfms-alivecheck port: 16104 targetPort: 16104 + protocol: TCP - name: owprov-restapi port: 16005 targetPort: 16005 @@ -436,6 +446,7 @@ jobs: - name: owprov-alivecheck port: 16105 targetPort: 16105 + protocol: TCP - name: owprov-ui-http port: 8080 targetPort: 8080 @@ -443,13 +454,23 @@ jobs: - name: owprov-ui-https port: 8443 targetPort: 8443 - - name: rttys-dev - port: 5912 - targetPort: 5912 protocol: TCP - - name: rttys-user - port: 5913 - targetPort: 5913 + - name: owanalytics-restapi + port: 16009 + targetPort: 16009 + protocol: TCP + - name: owanalytics-alivecheck + port: 16109 + targetPort: 16109 + protocol: TCP + - name: owsub-restapi + port: 16006 + targetPort: 16006 + protocol: TCP + - name: owsub-alivecheck + port: 16106 + targetPort: 16106 + protocol: TCP --- apiVersion: v1 kind: Pod @@ -514,14 +535,16 @@ jobs: value: "owfms.wlan.local" - name: INTERNAL_OWPROV_HOSTNAME value: "owprov.wlan.local" + - name: INTERNAL_OWANALYTICS_HOSTNAME + value: "owanalytics.wlan.local" + - name: INTERNAL_OWSUB_HOSTNAME + value: "owsub.wlan.local" - name: DEPLOY_VERSION value: "${{ github.event.inputs.sdk_version }}" - name: SYSTEM_URI_UI value: "https://${{ steps.cloudsdk.outputs.url }}" - name: DEFAULT_UCENTRALSEC_URL value: "https://${{ steps.cloudsdk.outputs.url }}:16001" - - name: RTTY_TOKEN - value: "$RTTY_TOKEN" - name: OWGW_FILEUPLOADER_HOST_NAME value: "${{ steps.cloudsdk.outputs.url }}" - name: OWGW_FILEUPLOADER_URI @@ -552,6 +575,14 @@ jobs: value: "https://owprov.wlan.local:17005" - name: OWPROV_SYSTEM_URI_PUBLIC value: "https://${{ steps.cloudsdk.outputs.url }}:16005" + - name: OWANALYTICS_SYSTEM_URI_PRIVATE + value: "https://owanalytics.wlan.local:17009" + - name: OWANALYTICS_SYSTEM_URI_PUBLIC + value: "https://${{ steps.cloudsdk.outputs.url }}:16009" + - name: OWSUB_SYSTEM_URI_PRIVATE + value: "https://owsub.wlan.local:17006" + - name: OWSUB_SYSTEM_URI_PUBLIC + value: "https://ow-docker-compose-${{ github.run_id }}.cicd.lab.wlan.tip.build:16006" - name: WEBSOCKET_CERT value: "/tip-cicd-wildcard-certs/websocket-cert.pem" - name: WEBSOCKET_KEY diff --git a/.github/workflows/ucentralgw-dev-deployment.yaml b/.github/workflows/ucentralgw-dev-deployment.yaml index 99cbd42ab97..dede2fea0b7 100644 --- a/.github/workflows/ucentralgw-dev-deployment.yaml +++ b/.github/workflows/ucentralgw-dev-deployment.yaml @@ -25,6 +25,8 @@ env: # - owsec_version - OpenWIFI Security version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) # - owfms_version - OpenWIFI Firmware version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) # - owprov_version - OpenWIFI Provisioning version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) + # - owanalytics_version - OpenWIFI Analytics version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) + # - owsub_version - OpenWIFI Subscription (Userportal) version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) # - owgwui_version - OpenWIFI Web UI version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) # - owprovui_version - OpenWIFI Provisioning Web UI version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) testbeds: '[ @@ -36,6 +38,8 @@ env: "owsec_version": "main", "owfms_version": "main", "owprov_version": "main", + "owanalytics_version": "main", + "owsub_version": "main", "owgwui_version": "main", "owprovui_version": "main" } @@ -92,8 +96,9 @@ jobs: export OWFMS_VERSION=${{ matrix.owfms_version }} export OWPROV_VERSION=${{ matrix.owprov_version }} export OWPROVUI_VERSION=${{ matrix.owprovui_version }} + export OWANALYTICS_VERSION=${{ matrix.owanalytics_version }} + export OWSUB_VERSION=${{ matrix.owsub_version }} export VALUES_FILE_LOCATION=values.ucentral-qa.yaml - export RTTY_TOKEN=${{ secrets.RTTY_TOKEN }} export OWGW_AUTH_USERNAME=${{ secrets.UCENTRALGW_AUTH_USERNAME }} export OWGW_AUTH_PASSWORD=${{ secrets.UCENTRALGW_AUTH_PASSWORD }} export OWFMS_S3_SECRET=${{ secrets.UCENTRALFMS_S3_SECRET }} diff --git a/.github/workflows/ucentralgw-qa-deployment.yaml b/.github/workflows/ucentralgw-qa-deployment.yaml index b71078221f6..1e2a0da92af 100644 --- a/.github/workflows/ucentralgw-qa-deployment.yaml +++ b/.github/workflows/ucentralgw-qa-deployment.yaml @@ -25,6 +25,8 @@ env: # - owsec_version - OpenWIFI Security version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) # - owfms_version - OpenWIFI Firmware version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) # - owprov_version - OpenWIFI Provisioning version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) + # - owanalytics_version - OpenWIFI Analytics version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) + # - owsub_version - OpenWIFI Subscription (Userportal) version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) # - owgwui_version - OpenWIFI Web UI version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) # - owprovui_version - OpenWIFI Provisioning Web UI version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required) testbeds: '[ @@ -36,6 +38,8 @@ env: "owsec_version": "v2.5.0-RC1", "owfms_version": "v2.5.0-RC1", "owprov_version": "v2.5.0-RC1", + "owanalytics_version": "main", + "owsub_version": "main", "owgwui_version": "v2.5.0-RC1", "owprovui_version": "v2.5.0-RC1" }, @@ -47,6 +51,8 @@ env: "owsec_version": "v2.5.0-RC1", "owfms_version": "v2.5.0-RC1", "owprov_version": "v2.5.0-RC1", + "owanalytics_version": "main", + "owsub_version": "main", "owgwui_version": "v2.5.0-RC1", "owprovui_version": "v2.5.0-RC1" } @@ -103,8 +109,9 @@ jobs: export OWFMS_VERSION=${{ matrix.owfms_version }} export OWPROV_VERSION=${{ matrix.owprov_version }} export OWPROVUI_VERSION=${{ matrix.owprovui_version }} + export OWANALYTICS_VERSION=${{ matrix.owanalytics_version }} + export OWSUB_VERSION=${{ matrix.owsub_version }} export VALUES_FILE_LOCATION=values.ucentral-qa.yaml - export RTTY_TOKEN=${{ secrets.RTTY_TOKEN }} export OWGW_AUTH_USERNAME=${{ secrets.UCENTRALGW_AUTH_USERNAME }} export OWGW_AUTH_PASSWORD=${{ secrets.UCENTRALGW_AUTH_PASSWORD }} export OWFMS_S3_SECRET=${{ secrets.UCENTRALFMS_S3_SECRET }} diff --git a/.github/workflows/update-badges.yml b/.github/workflows/update-badges.yml index 0cb83a9c6a8..81ee7065911 100644 --- a/.github/workflows/update-badges.yml +++ b/.github/workflows/update-badges.yml @@ -38,12 +38,12 @@ jobs: run: | mkdir -p ../.img wget https://img.shields.io/badge/total_tests-$(pytest --collect-only -q | tail -1 | cut -d ' ' -f 1)-green?style=flat-square -O ../badges/total-count.svg - wget https://img.shields.io/badge/interop_tests-$(pytest --collect-only -m "interop" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/interop-count.svg + wget https://img.shields.io/badge/interop_tests-$(pytest --collect-only -m "interop_uc_sanity and client_connect" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/interop-count.svg wget https://img.shields.io/badge/sanity_tests-$(pytest --collect-only -m "uc_sanity and not interop" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/sanity-count.svg wget https://img.shields.io/badge/performance_tests-$(pytest --collect-only -m "performance" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/performance-count.svg wget https://img.shields.io/badge/advance_tests-$(pytest --collect-only -m "advance" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/advance-count.svg wget https://img.shields.io/badge/regression_tests-$(pytest --collect-only -m "regression and not interop" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/regression-count.svg - wget https://img.shields.io/badge/interop_regression_tests-$(pytest --collect-only -m "regression and interop" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/regression-interop-count.svg + wget https://img.shields.io/badge/interop_performance_tests-$(pytest --collect-only -m "interop_uc_sanity and client_connectivity" -q | tail -1 | cut -d '/' -f 1)-green?style=flat-square -O ../badges/performance-interop-count.svg - name: commit changes working-directory: badges diff --git a/README.md b/README.md index c008e420df7..17d6cce2e6c 100644 --- a/README.md +++ b/README.md @@ -83,8 +83,8 @@ http://pythontesting.net/framework/pytest/pytest-introduction/ [![regression testing](https://github.com/Telecominfraproject/wlan-testing/actions/workflows/regression.yml/badge.svg)](https://github.com/Telecominfraproject/wlan-testing/actions/workflows/regression.yml) ![Regression test count](https://raw.githubusercontent.com/Telecominfraproject/wlan-testing/badges/regression-count.svg) -[![interop regression testing](https://github.com/Telecominfraproject/wlan-testing/actions/workflows/interop_regression.yml/badge.svg)](https://github.com/Telecominfraproject/wlan-testing/actions/workflows/interop_regression.yml) -![Interop Regression test count](https://raw.githubusercontent.com/Telecominfraproject/wlan-testing/badges/regression-interop-count.svg) +[![interop performance testing](https://github.com/Telecominfraproject/wlan-testing/actions/workflows/interop_performance.yml/badge.svg)](https://github.com/Telecominfraproject/wlan-testing/actions/workflows/interop_performance.yml) +![Interop Performance test count](https://raw.githubusercontent.com/Telecominfraproject/wlan-testing/badges/performance-interop-count.svg) ### Best Practice diff --git a/docker-compose/openwifi/deploy.sh b/docker-compose/openwifi/deploy.sh index 4ff817b275f..cd26ccd551b 100755 --- a/docker-compose/openwifi/deploy.sh +++ b/docker-compose/openwifi/deploy.sh @@ -12,19 +12,19 @@ usage () { echo; echo "- DEFAULT_UCENTRALSEC_URL - public URL of the OWSec service" echo "- SYSTEM_URI_UI - public URL of the OWGW-UI service" - echo "- RTTY_TOKEN - token to be used for rttys and OWGW for remote tty sessions" echo; echo "- INTERNAL_OWGW_HOSTNAME - OWGW microservice hostname for Docker internal communication" echo "- INTERNAL_OWSEC_HOSTNAME - OWSec microservice hostname for Docker internal communication" echo "- INTERNAL_OWFMS_HOSTNAME - OWFms microservice hostname for Docker internal communication" echo "- INTERNAL_OWPROV_HOSTNAME - OWProv microservice hostname for Docker internal communication" + echo "- INTERNAL_OWANALYTICS_HOSTNAME - OWAnalytics microservice hostname for Docker internal communication" + echo "- INTERNAL_OWSUB_HOSTNAME - OWSub microservice hostname for Docker internal communication" echo; echo "- OWGW_FILEUPLOADER_HOST_NAME - hostname to be used for OWGW fileupload"; echo "- OWGW_FILEUPLOADER_URI - URL to be used for OWGW fileupload"; echo "- OWGW_SYSTEM_URI_PRIVATE - private URL to be used for OWGW"; echo "- OWGW_SYSTEM_URI_PUBLIC - public URL to be used for OWGW"; echo "- OWGW_RTTY_SERVER - public hostname of the RTTY server"; - echo "- OWGW_RTTY_TOKEN - token to be used for rttys and OWGW for remote tty sessions"; echo; echo "- OWSEC_SYSTEM_URI_PRIVATE - private URL to be used for OWSec"; echo "- OWSEC_SYSTEM_URI_PUBLIC - public URL to be used for OWSec"; @@ -39,6 +39,12 @@ usage () { echo "- OWPROV_SYSTEM_URI_PRIVATE - private URL to be used for OWProv"; echo "- OWPROV_SYSTEM_URI_PUBLIC - public URL to be used for OWProv"; echo; + echo "- OWANALYTICS_SYSTEM_URI_PRIVATE - private URL to be used for OWAnalytics"; + echo "- OWANALYTICS_SYSTEM_URI_PUBLIC - public URL to be used for OWAnalytics"; + echo; + echo "- OWSUB_SYSTEM_URI_PRIVATE - private URL to be used for OWSub"; + echo "- OWSUB_SYSTEM_URI_PUBLIC - public URL to be used for OWSub"; + echo; echo "- WEBSOCKET_CERT - path to the websocket certificate"; echo "- WEBSOCKET_KEY - path to the websocket key"; } @@ -49,12 +55,13 @@ usage () { ## Configuration variables applying to multiple microservices [ -z ${DEFAULT_UCENTRALSEC_URL+x} ] && echo "DEFAULT_UCENTRALSEC_URL is unset" && usage && exit 1 [ -z ${SYSTEM_URI_UI+x} ] && echo "SYSTEM_URI_UI is unset" && usage && exit 1 -[ -z ${RTTY_TOKEN+x} ] && echo "RTTY_TOKEN is unset" && usage && exit 1 ## Internal microservice hostnames [ -z ${INTERNAL_OWGW_HOSTNAME+x} ] && echo "INTERNAL_OWGW_HOSTNAME is unset" && usage && exit 1 [ -z ${INTERNAL_OWSEC_HOSTNAME+x} ] && echo "INTERNAL_OWSEC_HOSTNAME is unset" && usage && exit 1 [ -z ${INTERNAL_OWFMS_HOSTNAME+x} ] && echo "INTERNAL_OWFMS_HOSTNAME is unset" && usage && exit 1 [ -z ${INTERNAL_OWPROV_HOSTNAME+x} ] && echo "INTERNAL_OWPROV_HOSTNAME is unset" && usage && exit 1 +[ -z ${INTERNAL_OWANALYTICS_HOSTNAME+x} ] && echo "INTERNAL_OWANALYTICS_HOSTNAME is unset" && usage && exit 1 +[ -z ${INTERNAL_OWSUB_HOSTNAME+x} ] && echo "INTERNAL_OWSUB_HOSTNAME is unset" && usage && exit 1 ## OWGW configuration variables [ -z ${OWGW_FILEUPLOADER_HOST_NAME+x} ] && echo "OWGW_FILEUPLOADER_HOST_NAME is unset" && usage && exit 1 [ -z ${OWGW_FILEUPLOADER_URI+x} ] && echo "OWGW_FILEUPLOADER_URI is unset" && usage && exit 1 @@ -74,6 +81,12 @@ usage () { ## OWProv configuration variables [ -z ${OWPROV_SYSTEM_URI_PRIVATE+x} ] && echo "OWPROV_SYSTEM_URI_PRIVATE is unset" && usage && exit 1 [ -z ${OWPROV_SYSTEM_URI_PUBLIC+x} ] && echo "OWPROV_SYSTEM_URI_PUBLIC is unset" && usage && exit 1 +## OWAnalytics configuration variables +[ -z ${OWANALYTICS_SYSTEM_URI_PRIVATE+x} ] && echo "OWANALYTICS_SYSTEM_URI_PRIVATE is unset" && usage && exit 1 +[ -z ${OWANALYTICS_SYSTEM_URI_PUBLIC+x} ] && echo "OWANALYTICS_SYSTEM_URI_PUBLIC is unset" && usage && exit 1 +## OWSub configuration variables +[ -z ${OWSUB_SYSTEM_URI_PRIVATE+x} ] && echo "OWSUB_SYSTEM_URI_PRIVATE is unset" && usage && exit 1 +[ -z ${OWSUB_SYSTEM_URI_PUBLIC+x} ] && echo "OWSUB_SYSTEM_URI_PUBLIC is unset" && usage && exit 1 ## cert related variables [ -z ${WEBSOCKET_CERT+x} ] && echo "WEBSOCKET_CERT is unset" && usage && exit 1 [ -z ${WEBSOCKET_KEY+x} ] && echo "WEBSOCKET_KEY is unset" && usage && exit 1 @@ -89,6 +102,8 @@ sed -i "s~\(^INTERNAL_OWGW_HOSTNAME=\).*~\1$INTERNAL_OWGW_HOSTNAME~" .env sed -i "s~\(^INTERNAL_OWSEC_HOSTNAME=\).*~\1$INTERNAL_OWSEC_HOSTNAME~" .env sed -i "s~\(^INTERNAL_OWFMS_HOSTNAME=\).*~\1$INTERNAL_OWFMS_HOSTNAME~" .env sed -i "s~\(^INTERNAL_OWPROV_HOSTNAME=\).*~\1$INTERNAL_OWPROV_HOSTNAME~" .env +sed -i "s~\(^INTERNAL_OWANALYTICS_HOSTNAME=\).*~\1$INTERNAL_OWANALYTICS_HOSTNAME~" .env +sed -i "s~\(^INTERNAL_OWSUB_HOSTNAME=\).*~\1$INTERNAL_OWSUB_HOSTNAME~" .env sed -i "s~\(^FILEUPLOADER_HOST_NAME=\).*~\1$OWGW_FILEUPLOADER_HOST_NAME~" owgw.env sed -i "s~\(^FILEUPLOADER_URI=\).*~\1$OWGW_FILEUPLOADER_URI~" owgw.env @@ -96,7 +111,6 @@ sed -i "s~\(^SYSTEM_URI_PRIVATE=\).*~\1$OWGW_SYSTEM_URI_PRIVATE~" owgw.env sed -i "s~\(^SYSTEM_URI_PUBLIC=\).*~\1$OWGW_SYSTEM_URI_PUBLIC~" owgw.env sed -i "s~\(^SYSTEM_URI_UI=\).*~\1$SYSTEM_URI_UI~" owgw.env sed -i "s~\(^RTTY_SERVER=\).*~\1$OWGW_RTTY_SERVER~" owgw.env -sed -i "s~.*RTTY_TOKEN=.*~RTTY_TOKEN=$RTTY_TOKEN~" owgw.env if [[ ! -z "$SIMULATORID" ]]; then sed -i "s~.*SIMULATORID=.*~SIMULATORID=$SIMULATORID~" owgw.env @@ -121,8 +135,15 @@ sed -i "s~\(^SYSTEM_URI_PUBLIC=\).*~\1$OWPROV_SYSTEM_URI_PUBLIC~" owprov.env sed -i "s~\(^SYSTEM_URI_UI=\).*~\1$SYSTEM_URI_UI~" owprov.env sed -i "s~\(^DEFAULT_UCENTRALSEC_URL=\).*~\1$DEFAULT_UCENTRALSEC_URL~" owprov-ui.env +sed -i "s~\(^REACT_APP_UCENTRALSEC_URL=\).*~\1$REACT_APP_UCENTRALSEC_URL~" owprov-ui.env + +sed -i "s~\(^SYSTEM_URI_PRIVATE=\).*~\1$OWANALYTICS_SYSTEM_URI_PRIVATE~" owanalytics.env +sed -i "s~\(^SYSTEM_URI_PUBLIC=\).*~\1$OWANALYTICS_SYSTEM_URI_PUBLIC~" owanalytics.env +sed -i "s~\(^SYSTEM_URI_UI=\).*~\1$SYSTEM_URI_UI~" owanalytics.env -sed -i "s~\(^token:\).*~\1 $RTTY_TOKEN~" rttys/rttys.conf +sed -i "s~\(^SYSTEM_URI_PRIVATE=\).*~\1$OWSUB_SYSTEM_URI_PRIVATE~" owsub.env +sed -i "s~\(^SYSTEM_URI_PUBLIC=\).*~\1$OWSUB_SYSTEM_URI_PUBLIC~" owsub.env +sed -i "s~\(^SYSTEM_URI_UI=\).*~\1$SYSTEM_URI_UI~" owsub.env # Run the deployment and attach to logs cat $WEBSOCKET_CERT > certs/websocket-cert.pem diff --git a/helm/ucentral/deploy.sh b/helm/ucentral/deploy.sh index df626b1cc82..9a24bf404b6 100755 --- a/helm/ucentral/deploy.sh +++ b/helm/ucentral/deploy.sh @@ -13,7 +13,6 @@ usage () { echo "- CHART_VERSION - version of chart to be deployed from assembly chart (for 'git' method git ref may be passed, for 'bundle' method version of chart may be passed)"; echo; echo "- VALUES_FILE_LOCATION - path to file with override values that may be used for deployment"; - echo "- RTTY_TOKEN - token to be used for rttys and OpenWIFI Gateway for remote tty sessions"; echo "- OWGW_AUTH_USERNAME - username to be used for requests to OpenWIFI Security"; echo "- OWGW_AUTH_PASSWORD - hashed password for OpenWIFI Security (details on this may be found in https://github.com/Telecominfraproject/wlan-cloud-ucentralsec/#authenticationdefaultpassword)"; echo "- OWFMS_S3_SECRET - secret key that is used for OpenWIFI Firmware access to firmwares S3 bucket"; @@ -30,6 +29,8 @@ usage () { echo "- OWFMS_VERSION - OpenWIFI Firmware version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)"; echo "- OWPROV_VERSION - OpenWIFI Provisioning version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)"; echo "- OWPROVUI_VERSION - OpenWIFI Provisioning Web UI version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)"; + echo "- OWANALYTICS_VERSION - OpenWIFI Analytics version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)"; + echo "- OWSUB_VERSION - OpenWIFI Subscription (Userportal) version to deploy (will be used for Docker image tag and git branch for Helm chart if git deployment is required)"; echo; echo "Optional environment variables:" echo; @@ -67,12 +68,13 @@ else [ -z ${OWFMS_VERSION+x} ] && echo "OWFMS_VERSION is unset" && usage && exit 1 [ -z ${OWPROV_VERSION+x} ] && echo "OWPROV_VERSION is unset" && usage && exit 1 [ -z ${OWPROVUI_VERSION+x} ] && echo "OWPROVUI_VERSION is unset" && usage && exit 1 + [ -z ${OWANALYTICS_VERSION+x} ] && echo "OWANALYTICS_VERSION is unset" && usage && exit 1 + [ -z ${OWSUB_VERSION+x} ] && echo "OWSUB_VERSION is unset" && usage && exit 1 fi ## Environment specifics [ -z ${NAMESPACE+x} ] && echo "NAMESPACE is unset" && usage && exit 1 ## Variables specifics [ -z ${VALUES_FILE_LOCATION+x} ] && echo "VALUES_FILE_LOCATION is unset" && usage && exit 1 -[ -z ${RTTY_TOKEN+x} ] && echo "RTTY_TOKEN is unset" && usage && exit 1 [ -z ${OWGW_AUTH_USERNAME+x} ] && echo "OWGW_AUTH_USERNAME is unset" && usage && exit 1 [ -z ${OWGW_AUTH_PASSWORD+x} ] && echo "OWGW_AUTH_PASSWORD is unset" && usage && exit 1 [ -z ${OWFMS_S3_SECRET+x} ] && echo "OWFMS_S3_SECRET is unset" && usage && exit 1 @@ -91,6 +93,8 @@ export OWSEC_VERSION_TAG=$(echo ${OWSEC_VERSION} | tr '/' '-') export OWFMS_VERSION_TAG=$(echo ${OWFMS_VERSION} | tr '/' '-') export OWPROV_VERSION_TAG=$(echo ${OWPROV_VERSION} | tr '/' '-') export OWPROVUI_VERSION_TAG=$(echo ${OWPROVUI_VERSION} | tr '/' '-') +export OWANALYTICS_VERSION_TAG=$(echo ${OWANALYTICS_VERSION} | tr '/' '-') +export OWSUB_VERSION_TAG=$(echo ${OWSUB_VERSION} | tr '/' '-') # Debug get bash version bash --version > /dev/stderr @@ -111,6 +115,8 @@ if [[ "$DEPLOY_METHOD" == "git" ]]; then sed -i '/wlan-cloud-ucentralfms@/s/ref=.*/ref='${OWFMS_VERSION}'\"/g' Chart.yaml sed -i '/wlan-cloud-owprov@/s/ref=.*/ref='${OWPROV_VERSION}'\"/g' Chart.yaml sed -i '/wlan-cloud-owprov-ui@/s/ref=.*/ref='${OWPROVUI_VERSION}'\"/g' Chart.yaml + sed -i '/wlan-cloud-analytics@/s/ref=.*/ref='${OWANALYTICS_VERSION}'\"/g' Chart.yaml + sed -i '/wlan-cloud-userportal@/s/ref=.*/ref='${OWSUB_VERSION}'\"/g' Chart.yaml fi helm repo add bitnami https://charts.bitnami.com/bitnami helm repo update @@ -139,10 +145,10 @@ for EXTRA_VALUE in ${EXTRA_VALUES_SPLITTED[*]}; do done if [[ "$USE_SEPARATE_OWGW_LB" == "true" ]]; then - export HAPROXY_SERVICE_DNS_RECORDS="sec-${NAMESPACE}.cicd.lab.wlan.tip.build\,fms-${NAMESPACE}.cicd.lab.wlan.tip.build\,prov-${NAMESPACE}.cicd.lab.wlan.tip.build\,rtty-${NAMESPACE}.cicd.lab.wlan.tip.build" + export HAPROXY_SERVICE_DNS_RECORDS="sec-${NAMESPACE}.cicd.lab.wlan.tip.build\,fms-${NAMESPACE}.cicd.lab.wlan.tip.build\,prov-${NAMESPACE}.cicd.lab.wlan.tip.build\,analytics-${NAMESPACE}.cicd.lab.wlan.tip.build\,sub-${NAMESPACE}.cicd.lab.wlan.tip.build" export OWGW_SERVICE_DNS_RECORDS="gw-${NAMESPACE}.cicd.lab.wlan.tip.build" else - export HAPROXY_SERVICE_DNS_RECORDS="gw-${NAMESPACE}.cicd.lab.wlan.tip.build\,sec-${NAMESPACE}.cicd.lab.wlan.tip.build\,fms-${NAMESPACE}.cicd.lab.wlan.tip.build\,prov-${NAMESPACE}.cicd.lab.wlan.tip.build\,rtty-${NAMESPACE}.cicd.lab.wlan.tip.build" + export HAPROXY_SERVICE_DNS_RECORDS="gw-${NAMESPACE}.cicd.lab.wlan.tip.build\,sec-${NAMESPACE}.cicd.lab.wlan.tip.build\,fms-${NAMESPACE}.cicd.lab.wlan.tip.build\,prov-${NAMESPACE}.cicd.lab.wlan.tip.build\,analytics-${NAMESPACE}.cicd.lab.wlan.tip.build\,sub-${NAMESPACE}.cicd.lab.wlan.tip.build" export OWGW_SERVICE_DNS_RECORDS="" fi @@ -152,11 +158,10 @@ helm upgrade --install --create-namespace --wait --timeout 60m \ ${VALUES_FILES_FLAGS[*]} \ --set owgw.services.owgw.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=gw-${NAMESPACE}.cicd.lab.wlan.tip.build \ --set owgw.configProperties."openwifi\.fileuploader\.host\.0\.name"=gw-${NAMESPACE}.cicd.lab.wlan.tip.build \ - --set owgw.configProperties."rtty\.server"=rtty-${NAMESPACE}.cicd.lab.wlan.tip.build \ + --set owgw.configProperties."rtty\.server"=gw-${NAMESPACE}.cicd.lab.wlan.tip.build \ --set owgw.configProperties."openwifi\.system\.uri\.public"=https://gw-${NAMESPACE}.cicd.lab.wlan.tip.build:16002 \ --set owgw.configProperties."openwifi\.system\.uri\.private"=https://owgw-owgw:17002 \ --set owgw.configProperties."openwifi\.system\.uri\.ui"=https://webui-${NAMESPACE}.cicd.lab.wlan.tip.build \ - --set owgw.configProperties."rtty\.token"=${RTTY_TOKEN} \ --set owgw.public_env_variables.OWSEC=sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \ --set owsec.configProperties."authentication\.default\.username"=${OWGW_AUTH_USERNAME} \ --set owsec.configProperties."authentication\.default\.password"=${OWGW_AUTH_PASSWORD} \ @@ -182,8 +187,17 @@ helm upgrade --install --create-namespace --wait --timeout 60m \ --set owprovui.ingresses.default.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=provui-${NAMESPACE}.cicd.lab.wlan.tip.build \ --set owprovui.ingresses.default.hosts={provui-${NAMESPACE}.cicd.lab.wlan.tip.build} \ --set owprovui.public_env_variables.DEFAULT_UCENTRALSEC_URL=https://sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \ - --set rttys.config.token=${RTTY_TOKEN} \ - --set rttys.services.rttys.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=rtty-${NAMESPACE}.cicd.lab.wlan.tip.build \ + --set owprovui.public_env_variables.REACT_APP_UCENTRALSEC_URL=https://sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \ + --set owanalytics.services.owanalytics.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=analytics-${NAMESPACE}.cicd.lab.wlan.tip.build \ + --set owanalytics.configProperties."openwifi\.system\.uri\.public"=https://analytics-${NAMESPACE}.cicd.lab.wlan.tip.build:16009 \ + --set owanalytics.configProperties."openwifi\.system\.uri\.private"=https://owanalytics-owanalytics:17009 \ + --set owanalytics.configProperties."openwifi\.system\.uri\.ui"=https://webui-${NAMESPACE}.cicd.lab.wlan.tip.build \ + --set owanalytics.public_env_variables.OWSEC=sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \ + --set owsub.services.owsub.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=sub-${NAMESPACE}.cicd.lab.wlan.tip.build \ + --set owsub.configProperties."openwifi\.system\.uri\.public"=https://sub-${NAMESPACE}.cicd.lab.wlan.tip.build:16006 \ + --set owsub.configProperties."openwifi\.system\.uri\.private"=https://owsub-owsub:17006 \ + --set owsub.configProperties."openwifi\.system\.uri\.ui"=https://webui-${NAMESPACE}.cicd.lab.wlan.tip.build \ + --set owsub.public_env_variables.OWSEC=sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \ --set clustersysteminfo.public_env_variables.OWSEC=sec-${NAMESPACE}.cicd.lab.wlan.tip.build:16001 \ --set clustersysteminfo.secret_env_variables.OWSEC_NEW_PASSWORD=${OWSEC_NEW_PASSWORD} \ --set owls.services.owls.annotations."external-dns\.alpha\.kubernetes\.io/hostname"=ls-${NAMESPACE}.cicd.lab.wlan.tip.build \ @@ -200,8 +214,6 @@ helm upgrade --install --create-namespace --wait --timeout 60m \ --set-file owgw.certs."restapi-key\.pem"=$KEY_LOCATION \ --set-file owgw.certs."websocket-cert\.pem"=$CERT_LOCATION \ --set-file owgw.certs."websocket-key\.pem"=$KEY_LOCATION \ - --set-file rttys.certs."restapi-cert\.pem"=$CERT_LOCATION \ - --set-file rttys.certs."restapi-key\.pem"=$KEY_LOCATION \ --set-file owsec.certs."restapi-cert\.pem"=$CERT_LOCATION \ --set-file owsec.certs."restapi-key\.pem"=$KEY_LOCATION \ --set-file owfms.certs."restapi-cert\.pem"=$CERT_LOCATION \ @@ -212,4 +224,8 @@ helm upgrade --install --create-namespace --wait --timeout 60m \ --set-file owls.certs."restapi-key\.pem"=$KEY_LOCATION \ --set-file owls.certs."device-cert\.pem"=$DEVICE_CERT_LOCATION \ --set-file owls.certs."device-key\.pem"=$DEVICE_KEY_LOCATION \ + --set-file owanalytics.certs."restapi-cert\.pem"=$CERT_LOCATION \ + --set-file owanalytics.certs."restapi-key\.pem"=$KEY_LOCATION \ + --set-file owsub.certs."restapi-cert\.pem"=$CERT_LOCATION \ + --set-file owsub.certs."restapi-key\.pem"=$KEY_LOCATION \ tip-openwifi $DEPLOY_SOURCE diff --git a/helm/ucentral/values.ucentral-qa.separate-lbs.yaml b/helm/ucentral/values.ucentral-qa.separate-lbs.yaml index cebf51ca407..bb0133fbe8f 100644 --- a/helm/ucentral/values.ucentral-qa.separate-lbs.yaml +++ b/helm/ucentral/values.ucentral-qa.separate-lbs.yaml @@ -8,7 +8,7 @@ owgw: service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "16102" service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285" - service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16002,16003,17002" + service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16002,16003,17002,5912,5913" owsec: services: @@ -22,18 +22,6 @@ owsec: service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285" service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16001,17001" -rttys: - services: - rttys: - type: LoadBalancer - annotations: - service.beta.kubernetes.io/aws-load-balancer-type: "nlb-ip" - service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing - service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "5914" - service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl - service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285" - service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "5912,5913" - owfms: services: owfms: @@ -58,5 +46,29 @@ owprov: service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285" service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16005,17005" +owanalytics: + services: + owanalytics: + type: LoadBalancer + annotations: + service.beta.kubernetes.io/aws-load-balancer-type: "nlb-ip" + service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing + service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "16109" + service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl + service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285" + service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16009,17009" + +owsub: + services: + owsub: + type: LoadBalancer + annotations: + service.beta.kubernetes.io/aws-load-balancer-type: "nlb-ip" + service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing + service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "16106" + service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl + service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285" + service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16006,17006" + haproxy: enabled: false diff --git a/helm/ucentral/values.ucentral-qa.test-nodes.yaml b/helm/ucentral/values.ucentral-qa.test-nodes.yaml index ccacd53456a..f5eb0622646 100644 --- a/helm/ucentral/values.ucentral-qa.test-nodes.yaml +++ b/helm/ucentral/values.ucentral-qa.test-nodes.yaml @@ -94,7 +94,7 @@ owlsui: operator: "Exists" effect: "NoSchedule" -rttys: +owanalytics: nodeSelector: env: tests tolerations: diff --git a/helm/ucentral/values.ucentral-qa.yaml b/helm/ucentral/values.ucentral-qa.yaml index 38889c14198..eec7d968f72 100644 --- a/helm/ucentral/values.ucentral-qa.yaml +++ b/helm/ucentral/values.ucentral-qa.yaml @@ -189,18 +189,6 @@ owsec: secret: secretName: {{ include "owsec.fullname" . }}-owsec-restapi-tls -rttys: - resources: - requests: - cpu: 10m - memory: 15Mi - limits: - cpu: 100m - memory: 100Mi - - podAnnotations: - cluster-autoscaler.kubernetes.io/safe-to-evict: "false" - owgwui: ingresses: default: @@ -321,7 +309,7 @@ owprov: readiness: exec: command: ["true"] - + resources: requests: cpu: 10m @@ -420,6 +408,173 @@ owprovui: podAnnotations: cluster-autoscaler.kubernetes.io/safe-to-evict: "false" +owanalytics: + checks: + owanalytics: + readiness: + exec: + command: ["true"] + + resources: + requests: + cpu: 10m + memory: 100Mi + limits: + cpu: 100m + memory: 500Mi + + podAnnotations: + cluster-autoscaler.kubernetes.io/safe-to-evict: "false" + + certs: + restapi-ca.pem: | + -----BEGIN CERTIFICATE----- + MIIDojCCAoqgAwIBAgIUPVYBpqNbcLYygF6Mx+qxSWwQyFowDQYJKoZIhvcNAQEL + BQAwaTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG1RlbGVjb20gSW5mcmEgUHJvamVj + dCwgSW5jLjEMMAoGA1UECxMDVElQMSYwJAYDVQQDEx1UZWxlY29tIEluZnJhIFBy + b2plY3QgUm9vdCBDQTAeFw0yMTA0MTMyMjQyNDRaFw0zMTA0MTMyMjM4NDZaMGkx + CzAJBgNVBAYTAlVTMSQwIgYDVQQKExtUZWxlY29tIEluZnJhIFByb2plY3QsIElu + Yy4xDDAKBgNVBAsTA1RJUDEmMCQGA1UEAxMdVGVsZWNvbSBJbmZyYSBQcm9qZWN0 + IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIGCibwf5u + AAwZ+1H8U0e3u2V+0d2gSctucoK86XwUmfe1V2a/qlCYZd29r80IuN1IIeB0naIm + KnK/MzXW87clF6tFd1+HzEvmlY/W4KyIXalVCTEzirFSvBEG2oZpM0yC3AefytAO + aOpA00LaM3xTfTqMKIRhJBuLy0I4ANUVG6ixVebbGuc78IodleqiLoWy2Q9QHyEO + t/7hZndJhiVogh0PveRhho45EbsACu7ymDY+JhlIleevqwlE3iQoq0YcmYADHno6 + Eq8vcwLpZFxihupUafkd1T3WJYQAJf9coCjBu2qIhNgrcrGD8R9fGswwNRzMRMpX + 720+GjcDW3bJAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFAJG + lmB5sVP2qfL3xZ8hQOTpkQH6MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF + AAOCAQEAVjl9dm4epG9NUYnagT9sg7scVQEPfz3Lt6w1NXJXgD8mAUlK0jXmEyvM + dCPD4514n+8+lM7US8fh+nxc7jO//LwK17Wm9FblgjNFR7+anv0Q99T9fP19DLlF + PSNHL2emogy1bl1lLTAoj8nxg2wVKPDSHBGviQ5LR9fsWUIJDv9Bs5k0qWugWYSj + 19S6qnHeskRDB8MqRLhKMG82oDVLerSnhD0P6HjySBHgTTU7/tYS/OZr1jI6MPbG + L+/DtiR5fDVMNdBSGU89UNTi0wHY9+RFuNlIuvZC+x/swF0V9R5mN+ywquTPtDLA + 5IOM7ItsRmen6u3qu+JXros54e4juQ== + -----END CERTIFICATE----- + + public_env_variables: + SELFSIGNED_CERTS: "true" + + configProperties: + openwifi.internal.restapi.host.0.rootca: $OWANALYTICS_ROOT/certs/restapi-certs/ca.crt + openwifi.internal.restapi.host.0.cert: $OWANALYTICS_ROOT/certs/restapi-certs/tls.crt + openwifi.internal.restapi.host.0.key: $OWANALYTICS_ROOT/certs/restapi-certs/tls.key + openwifi.restapi.host.0.rootca: $OWANALYTICS_ROOT/certs/restapi-certs/ca.crt + openwifi.restapi.host.0.cert: $OWANALYTICS_ROOT/certs/restapi-certs/tls.crt + openwifi.restapi.host.0.key: $OWANALYTICS_ROOT/certs/restapi-certs/tls.key + + volumes: + owanalytics: + - name: config + mountPath: /owanalytics-data/owanalytics.properties + subPath: owanalytics.properties + # Template below will be rendered in template + volumeDefinition: | + secret: + secretName: {{ include "owanalytics.fullname" . }}-config + - name: certs + mountPath: /owanalytics-data/certs + volumeDefinition: | + secret: + secretName: {{ include "owanalytics.fullname" . }}-certs + - name: persist + mountPath: /owanalytics-data/persist + volumeDefinition: | + persistentVolumeClaim: + claimName: {{ template "owanalytics.fullname" . }}-pvc + + - name: restapi-certs + mountPath: /owanalytics-data/certs/restapi-certs + volumeDefinition: | + secret: + secretName: {{ include "owanalytics.fullname" . }}-owanalytics-restapi-tls + - name: restapi-ca + mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem + subPath: ca.crt + volumeDefinition: | + secret: + secretName: {{ include "owanalytics.fullname" . }}-owanalytics-restapi-tls + +owsub: + resources: + requests: + cpu: 10m + memory: 100Mi + limits: + cpu: 100m + memory: 500Mi + + podAnnotations: + cluster-autoscaler.kubernetes.io/safe-to-evict: "false" + + certs: + restapi-ca.pem: | + -----BEGIN CERTIFICATE----- + MIIDojCCAoqgAwIBAgIUPVYBpqNbcLYygF6Mx+qxSWwQyFowDQYJKoZIhvcNAQEL + BQAwaTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG1RlbGVjb20gSW5mcmEgUHJvamVj + dCwgSW5jLjEMMAoGA1UECxMDVElQMSYwJAYDVQQDEx1UZWxlY29tIEluZnJhIFBy + b2plY3QgUm9vdCBDQTAeFw0yMTA0MTMyMjQyNDRaFw0zMTA0MTMyMjM4NDZaMGkx + CzAJBgNVBAYTAlVTMSQwIgYDVQQKExtUZWxlY29tIEluZnJhIFByb2plY3QsIElu + Yy4xDDAKBgNVBAsTA1RJUDEmMCQGA1UEAxMdVGVsZWNvbSBJbmZyYSBQcm9qZWN0 + IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIGCibwf5u + AAwZ+1H8U0e3u2V+0d2gSctucoK86XwUmfe1V2a/qlCYZd29r80IuN1IIeB0naIm + KnK/MzXW87clF6tFd1+HzEvmlY/W4KyIXalVCTEzirFSvBEG2oZpM0yC3AefytAO + aOpA00LaM3xTfTqMKIRhJBuLy0I4ANUVG6ixVebbGuc78IodleqiLoWy2Q9QHyEO + t/7hZndJhiVogh0PveRhho45EbsACu7ymDY+JhlIleevqwlE3iQoq0YcmYADHno6 + Eq8vcwLpZFxihupUafkd1T3WJYQAJf9coCjBu2qIhNgrcrGD8R9fGswwNRzMRMpX + 720+GjcDW3bJAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFAJG + lmB5sVP2qfL3xZ8hQOTpkQH6MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF + AAOCAQEAVjl9dm4epG9NUYnagT9sg7scVQEPfz3Lt6w1NXJXgD8mAUlK0jXmEyvM + dCPD4514n+8+lM7US8fh+nxc7jO//LwK17Wm9FblgjNFR7+anv0Q99T9fP19DLlF + PSNHL2emogy1bl1lLTAoj8nxg2wVKPDSHBGviQ5LR9fsWUIJDv9Bs5k0qWugWYSj + 19S6qnHeskRDB8MqRLhKMG82oDVLerSnhD0P6HjySBHgTTU7/tYS/OZr1jI6MPbG + L+/DtiR5fDVMNdBSGU89UNTi0wHY9+RFuNlIuvZC+x/swF0V9R5mN+ywquTPtDLA + 5IOM7ItsRmen6u3qu+JXros54e4juQ== + -----END CERTIFICATE----- + + public_env_variables: + SELFSIGNED_CERTS: "true" + + configProperties: + openwifi.internal.restapi.host.0.rootca: $OWSUB_ROOT/certs/restapi-certs/ca.crt + openwifi.internal.restapi.host.0.cert: $OWSUB_ROOT/certs/restapi-certs/tls.crt + openwifi.internal.restapi.host.0.key: $OWSUB_ROOT/certs/restapi-certs/tls.key + openwifi.restapi.host.0.rootca: $OWSUB_ROOT/certs/restapi-certs/ca.crt + openwifi.restapi.host.0.cert: $OWSUB_ROOT/certs/restapi-certs/tls.crt + openwifi.restapi.host.0.key: $OWSUB_ROOT/certs/restapi-certs/tls.key + + volumes: + owsub: + - name: config + mountPath: /owsub-data/owsub.properties + subPath: owsub.properties + # Template below will be rendered in template + volumeDefinition: | + secret: + secretName: {{ include "owsub.fullname" . }}-config + - name: certs + mountPath: /owsub-data/certs + volumeDefinition: | + secret: + secretName: {{ include "owsub.fullname" . }}-certs + - name: persist + mountPath: /owsub-data/persist + volumeDefinition: | + persistentVolumeClaim: + claimName: {{ template "owsub.fullname" . }}-pvc + + - name: restapi-certs + mountPath: /owsub-data/certs/restapi-certs + volumeDefinition: | + secret: + secretName: {{ include "owsub.fullname" . }}-owsub-restapi-tls + - name: restapi-ca + mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem + subPath: ca.crt + volumeDefinition: | + secret: + secretName: {{ include "owsub.fullname" . }}-owsub-restapi-tls + + kafka: commonAnnotations: cluster-autoscaler.kubernetes.io/safe-to-evict: "false" @@ -458,7 +613,7 @@ haproxy: service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "8080" service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285 - service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16004,17004,16002,16003,17002,16005,17005,16001,17001,5912,5913" + service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16004,17004,16002,16003,17002,16005,17005,16001,17001,5912,5913,16009" service.beta.kubernetes.io/aws-load-balancer-type: nlb-ip restapiCerts: diff --git a/libs/controller/controller_2x/controller.py b/libs/controller/controller_2x/controller.py index c80bdfd4950..f2782dc8117 100644 --- a/libs/controller/controller_2x/controller.py +++ b/libs/controller/controller_2x/controller.py @@ -468,7 +468,7 @@ def get_ssid_info(self): ssid_info.append(temp) return ssid_info - def set_radio_config(self, radio_config={}, DFS=False, channel=None, bw=None): + def set_radio_config(self, radio_config={}): base_radio_config_2g = { "band": "2G", "country": "CA", @@ -493,17 +493,9 @@ def set_radio_config(self, radio_config={}, DFS=False, channel=None, bw=None): # for keys in radio_config[band]: # base_radio_config_6g[keys] = radio_config[band][keys] - if DFS: - self.base_profile_config["radios"].append({ - "band": "5G", - "country": "CA", - "channel-mode": "VHT", - "channel-width": bw, - "channel": channel - }) - else: - self.base_profile_config["radios"].append(base_radio_config_2g) - self.base_profile_config["radios"].append(base_radio_config_5g) + + self.base_profile_config["radios"].append(base_radio_config_2g) + self.base_profile_config["radios"].append(base_radio_config_5g) print(self.base_profile_config) self.vlan_section["ssids"] = [] self.vlan_ids = [] diff --git a/tests/e2e/basic/dfs_test/wpa2_personal/dfs_20MHz/test_dfs_20_bridge.py b/tests/e2e/basic/dfs_test/wpa2_personal/dfs_20MHz/test_dfs_20_bridge.py index 36e0486ecb3..4054d394dc2 100644 --- a/tests/e2e/basic/dfs_test/wpa2_personal/dfs_20MHz/test_dfs_20_bridge.py +++ b/tests/e2e/basic/dfs_test/wpa2_personal/dfs_20MHz/test_dfs_20_bridge.py @@ -13,11 +13,16 @@ {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 52, - "channel_bandwidth": 20 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 20, + "channel": 52 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -38,7 +43,7 @@ def test_dfs_channel_52_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_ profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general1["dfs"]["channel"] + channel = setup_params_general1["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -87,11 +92,16 @@ def test_dfs_channel_52_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_ {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 100, - "channel_bandwidth": 20 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 20, + "channel": 100 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -112,7 +122,7 @@ def test_dfs_channel_100_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general2["dfs"]["channel"] + channel = setup_params_general2["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -161,11 +171,16 @@ def test_dfs_channel_100_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 104, - "channel_bandwidth": 20 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 20, + "channel": 104 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -186,7 +201,7 @@ def test_dfs_channel_104_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general3["dfs"]["channel"] + channel = setup_params_general3["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -235,11 +250,16 @@ def test_dfs_channel_104_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 56, - "channel_bandwidth": 20 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 20, + "channel": 56 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -260,7 +280,7 @@ def test_dfs_channel_56_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_ profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general4["dfs"]["channel"] + channel = setup_params_general4["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -309,11 +329,16 @@ def test_dfs_channel_56_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_ {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 60, - "channel_bandwidth": 20 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 20, + "channel": 60 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -334,7 +359,7 @@ def test_dfs_channel_60_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_ profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general5["dfs"]["channel"] + channel = setup_params_general5["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -383,11 +408,16 @@ def test_dfs_channel_60_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_ {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 64, - "channel_bandwidth": 20 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 20, + "channel": 64 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -408,7 +438,7 @@ def test_dfs_channel_64_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_ profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general6["dfs"]["channel"] + channel = setup_params_general6["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -457,11 +487,16 @@ def test_dfs_channel_64_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs_ {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 108, - "channel_bandwidth": 20 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 20, + "channel": 108 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -482,7 +517,7 @@ def test_dfs_channel_108_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general7["dfs"]["channel"] + channel = setup_params_general7["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -531,11 +566,16 @@ def test_dfs_channel_108_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 112, - "channel_bandwidth": 20 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 20, + "channel": 112 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -556,7 +596,7 @@ def test_dfs_channel_112_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general8["dfs"]["channel"] + channel = setup_params_general8["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -679,11 +719,16 @@ def test_dfs_channel_112_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 132, - "channel_bandwidth": 20 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 20, + "channel": 132 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -704,7 +749,7 @@ def test_dfs_channel_132_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general10["dfs"]["channel"] + channel = setup_params_general10["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -753,11 +798,16 @@ def test_dfs_channel_132_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 136, - "channel_bandwidth": 20 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 20, + "channel": 136 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -778,7 +828,7 @@ def test_dfs_channel_136_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general11["dfs"]["channel"] + channel = setup_params_general11["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -827,11 +877,16 @@ def test_dfs_channel_136_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 140, - "channel_bandwidth": 20 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 20, + "channel": 140 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -852,7 +907,7 @@ def test_dfs_channel_140_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general12["dfs"]["channel"] + channel = setup_params_general12["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -901,11 +956,16 @@ def test_dfs_channel_140_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 144, - "channel_bandwidth": 20 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 20, + "channel": 144 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -926,7 +986,7 @@ def test_dfs_channel_144_bw_20(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general13["dfs"]["channel"] + channel = setup_params_general13["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" diff --git a/tests/e2e/basic/dfs_test/wpa2_personal/dfs_40MHz/test_dfs_40_bridge.py b/tests/e2e/basic/dfs_test/wpa2_personal/dfs_40MHz/test_dfs_40_bridge.py index 61d6b3bf516..c5379c80c49 100644 --- a/tests/e2e/basic/dfs_test/wpa2_personal/dfs_40MHz/test_dfs_40_bridge.py +++ b/tests/e2e/basic/dfs_test/wpa2_personal/dfs_40MHz/test_dfs_40_bridge.py @@ -13,11 +13,16 @@ {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 52, - "channel_bandwidth": 40 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 40, + "channel": 52 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -38,7 +43,7 @@ def test_dfs_channel_52_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_ profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general1["dfs"]["channel"] + channel = setup_params_general1["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -87,11 +92,16 @@ def test_dfs_channel_52_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_ {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 100, - "channel_bandwidth": 40 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 40, + "channel": 100 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -112,7 +122,7 @@ def test_dfs_channel_100_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general2["dfs"]["channel"] + channel = setup_params_general2["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -309,11 +319,16 @@ def test_dfs_channel_100_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 60, - "channel_bandwidth": 40 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 40, + "channel": 60 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -334,7 +349,7 @@ def test_dfs_channel_60_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_ profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general5["dfs"]["channel"] + channel = setup_params_general5["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -457,11 +472,16 @@ def test_dfs_channel_60_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs_ {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 108, - "channel_bandwidth": 40 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 40, + "channel": 108 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -482,7 +502,7 @@ def test_dfs_channel_108_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general7["dfs"]["channel"] + channel = setup_params_general7["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -753,11 +773,17 @@ def test_dfs_channel_108_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 132, - "channel_bandwidth": 40 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 40, + "channel": 132 + } + }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -778,7 +804,7 @@ def test_dfs_channel_132_bw_40(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general11["dfs"]["channel"] + channel = setup_params_general11["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" diff --git a/tests/e2e/basic/dfs_test/wpa2_personal/dfs_80MHz/test_dfs_80_bridge.py b/tests/e2e/basic/dfs_test/wpa2_personal/dfs_80MHz/test_dfs_80_bridge.py index 9e3d354267e..fa90244c380 100644 --- a/tests/e2e/basic/dfs_test/wpa2_personal/dfs_80MHz/test_dfs_80_bridge.py +++ b/tests/e2e/basic/dfs_test/wpa2_personal/dfs_80MHz/test_dfs_80_bridge.py @@ -13,11 +13,16 @@ {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 52, - "channel_bandwidth": 80 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 80, + "channel": 52 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -38,7 +43,7 @@ def test_dfs_channel_52_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_ profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general1["dfs"]["channel"] + channel = setup_params_general1["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -87,11 +92,16 @@ def test_dfs_channel_52_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs_ {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 100, - "channel_bandwidth": 80 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 80, + "channel": 100 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -112,7 +122,7 @@ def test_dfs_channel_100_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general2["dfs"]["channel"] + channel = setup_params_general2["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" @@ -753,11 +763,16 @@ def test_dfs_channel_100_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs {"ssid_name": "ssid_wpa2_5g", "appliedRadios": ["5G"], "security_key": "something"} ] }, - "dfs": { - "channel": 132, - "channel_bandwidth": 80 + "rf": { + "5G": { + "band": "5G", + "country": "CA", + "allow-dfs": True, + "channel-mode": "VHT", + "channel-width": 80, + "channel": 132 + } }, - "rf": {}, "radius": False } @pytest.mark.parametrize( @@ -778,7 +793,7 @@ def test_dfs_channel_132_bw_80(self, lf_test, lf_tools, station_names_fiveg, dfs profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] ssid_name = profile_data["ssid_name"] security_key = profile_data["security_key"] - channel = setup_params_general11["dfs"]["channel"] + channel = setup_params_general11["rf"]["5G"]["channel"] security = "wpa2" band = "fiveg" mode = "BRIDGE" diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_tls.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_tls.py index 2290f4a7ac2..c8684c0b632 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_tls.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_tls.py @@ -37,7 +37,7 @@ class TestBridgeModeEnterpriseTLSSuiteA(object): @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_tls_wpa_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_tls_wpa_enterprise_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -66,7 +66,7 @@ def test_tls_wpa_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_tls_wpa_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_tls_wpa_enterprise_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, setup_profiles, lf_test, update_report, exit_on_fail, test_cases, radius_info): @@ -96,7 +96,7 @@ def test_tls_wpa_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_tls_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_tls_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -124,7 +124,7 @@ def test_tls_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_tls_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_tls_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, setup_profiles, lf_test, update_report, exit_on_fail, test_cases, radius_info): @@ -154,7 +154,7 @@ def test_tls_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_enterprise @pytest.mark.twog @pytest.mark.shivam - def test_tls_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_tls_wpa3_enterprise_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -182,7 +182,7 @@ def test_tls_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_tls_wpa3_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_tls_wpa3_enterprise_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, setup_profiles, lf_test, update_report, exit_on_fail, test_cases, radius_info): @@ -242,7 +242,7 @@ class TestBridgeModeEnterpriseTLSSuiteTwo(object): @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -258,9 +258,6 @@ def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, identity=identity, @@ -270,7 +267,7 @@ def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -286,9 +283,6 @@ def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, identity=identity, @@ -298,7 +292,7 @@ def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa3_enterprise_mixed_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -313,9 +307,6 @@ def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs, get_lf_logs, tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, identity=identity, @@ -325,7 +316,7 @@ def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_wpa3_enterprise_mixed_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa3_enterprise_mixed_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, setup_profiles, lf_test, update_report, exit_on_fail, test_cases, radius_info): @@ -341,9 +332,6 @@ def test_wpa3_enterprise_mixed_5g(self, get_vif_state, get_ap_logs, get_lf_logs, tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, identity=identity, diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py index 078f141ea15..2272a10ee34 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py @@ -50,7 +50,7 @@ class TestBridgeModeConnectivitySuiteA(object): @pytest.mark.twog @pytest.mark.hari @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2809", name="JIRA LINK") - def test_open_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, lf_test, + def test_open_ssid_2g(self, get_ap_logs, get_lf_logs, lf_test, update_report, station_names_twog, test_cases): @@ -64,10 +64,6 @@ def test_open_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, lf_test, mode = "BRIDGE" band = "twog" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -77,7 +73,7 @@ def test_open_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, lf_test, @pytest.mark.open @pytest.mark.fiveg @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2801", name="JIRA LINK") - def test_open_ssid_5g(self, get_vif_state, get_ap_logs, lf_test, test_cases, station_names_fiveg, get_lf_logs, + def test_open_ssid_5g(self, get_ap_logs, lf_test, test_cases, station_names_fiveg, get_lf_logs, update_report): """Client Connectivity open ssid 5G pytest -m "client_connectivity and bridge and general and open and fiveg" @@ -89,10 +85,6 @@ def test_open_ssid_5g(self, get_vif_state, get_ap_logs, lf_test, test_cases, st mode = "BRIDGE" band = "fiveg" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -104,7 +96,7 @@ def test_open_ssid_5g(self, get_vif_state, get_ap_logs, lf_test, test_cases, st @pytest.mark.twog @allure.story('wpa 2.4 GHZ Band') @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2801", name="JIRA LINK") - def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, update_report, get_lf_logs, + def test_wpa_ssid_2g(self, get_ap_logs, update_report, get_lf_logs, lf_test, test_cases, station_names_twog): """Client Connectivity wpa ssid 2.4G pytest -m "client_connectivity and bridge and general and wpa and twog" @@ -116,10 +108,6 @@ def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, update_report, get_lf_log mode = "BRIDGE" band = "twog" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -130,7 +118,7 @@ def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, update_report, get_lf_log @pytest.mark.wpa @pytest.mark.fiveg @allure.story('wpa 5 GHZ Band') - def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, lf_test, update_report, get_lf_logs, + def test_wpa_ssid_5g(self, get_ap_logs, lf_test, update_report, get_lf_logs, test_cases, station_names_fiveg): """Client Connectivity wpa ssid 5G pytest -m "client_connectivity and bridge and general and wpa and fiveg" @@ -142,10 +130,6 @@ def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, lf_test, update_report, g mode = "BRIDGE" band = "fiveg" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -156,7 +140,7 @@ def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, lf_test, update_report, g @pytest.mark.wpa2_personal @pytest.mark.twog @allure.story('wpa2_personal 2.4 GHZ Band') - def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa2_personal_ssid_2g(self, get_ap_logs, get_lf_logs, lf_test, update_report, test_cases, station_names_twog): """Client Connectivity wpa2_personal ssid 2.4G @@ -169,10 +153,6 @@ def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "BRIDGE" band = "twog" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -183,7 +163,7 @@ def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa2_personal @pytest.mark.fiveg @allure.story('wpa2_personal 5 GHZ Band') - def test_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, update_report, test_cases, + def test_wpa2_personal_ssid_5g(self, get_ap_logs, update_report, test_cases, station_names_fiveg, get_lf_logs, lf_test): """Client Connectivity wpa2_personal ssid 5G @@ -196,10 +176,6 @@ def test_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, update_report, mode = "BRIDGE" band = "fiveg" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -247,7 +223,7 @@ class TestBridgeModeConnectivitySuiteTwo(object): @pytest.mark.wpa3_personal @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, station_names_twog, lf_test, + def test_wpa3_personal_ssid_2g(self, get_ap_logs, station_names_twog, lf_test, update_report, test_cases): """Client Connectivity open ssid 2.4G @@ -260,10 +236,6 @@ def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, station_names_t mode = "BRIDGE" band = "twog" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -273,7 +245,7 @@ def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, station_names_t @pytest.mark.wpa3_personal @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, + def test_wpa3_personal_ssid_5g(self, get_ap_logs, station_names_fiveg, lf_test, test_cases, get_lf_logs, update_report): """Client Connectivity open ssid 2.4G @@ -286,10 +258,6 @@ def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, station_names_f mode = "BRIDGE" band = "fiveg" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -299,7 +267,7 @@ def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, station_names_f @pytest.mark.wpa3_personal_mixed @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, station_names_twog, + def test_wpa3_personal_mixed_ssid_2g(self, get_ap_logs, station_names_twog, lf_test, get_lf_logs, update_report, test_cases): @@ -313,10 +281,6 @@ def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, station_n mode = "BRIDGE" band = "twog" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -326,7 +290,7 @@ def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, station_n @pytest.mark.wpa3_personal_mixed @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, lf_test, + def test_wpa3_personal_mixed_ssid_5g(self, get_ap_logs, station_names_fiveg, lf_test, test_cases, get_lf_logs, update_report): """Client Connectivity open ssid 2.4G @@ -339,10 +303,6 @@ def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, station_n mode = "BRIDGE" band = "fiveg" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -352,7 +312,7 @@ def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, station_n @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.twog @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band') - def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, station_names_twog, + def test_wpa_wpa2_personal_ssid_2g(self, get_ap_logs, station_names_twog, lf_test, get_lf_logs, update_report, test_cases): @@ -367,10 +327,6 @@ def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, station_nam mode = "BRIDGE" band = "twog" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -380,7 +336,7 @@ def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, station_nam @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.fiveg @allure.story('wpa wpa2 personal mixed 5 GHZ Band') - def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, station_names_fiveg, get_lf_logs, + def test_wpa_wpa2_personal_ssid_5g(self, get_ap_logs, station_names_fiveg, get_lf_logs, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G @@ -394,10 +350,6 @@ def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, station_nam mode = "BRIDGE" band = "fiveg" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_tls.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_tls.py index cb793754974..7890dfa4fe2 100644 --- a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_tls.py +++ b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_tls.py @@ -34,7 +34,7 @@ class TestNATModeEnterpriseTLSSuiteOne(object): @pytest.mark.wpa_enterprise @pytest.mark.twog - def test_tls_wpa_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_tls_wpa_enterprise_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -63,7 +63,7 @@ def test_tls_wpa_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa_enterprise @pytest.mark.fiveg - def test_tls_wpa_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_tls_wpa_enterprise_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -105,7 +105,7 @@ def test_tls_wpa_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa2_enterprise @pytest.mark.twog - def test_tls_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_tls_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -133,7 +133,7 @@ def test_tls_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa2_enterprise @pytest.mark.fiveg - def test_tls_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_tls_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -174,7 +174,7 @@ def test_tls_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_enterprise @pytest.mark.twog - def test_tls_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_tls_wpa3_enterprise_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -202,7 +202,7 @@ def test_tls_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_tls_wpa3_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_tls_wpa3_enterprise_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa3 enterprise 5g @@ -263,7 +263,7 @@ class TestNATModeEnterpriseTLSSuiteTwo(object): @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -279,9 +279,6 @@ def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, identity=identity, @@ -291,7 +288,7 @@ def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -307,9 +304,6 @@ def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, identity=identity, @@ -319,7 +313,7 @@ def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa3_enterprise_mixed_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): """ wpa enterprise 2g @@ -334,9 +328,6 @@ def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs, get_lf_logs, tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, identity=identity, @@ -346,7 +337,7 @@ def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_wpa3_enterprise_mixed_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa3_enterprise_mixed_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, setup_profiles, lf_test, update_report, exit_on_fail, test_cases, radius_info): @@ -362,9 +353,6 @@ def test_wpa3_enterprise_mixed_5g(self, get_vif_state, get_ap_logs, get_lf_logs, tls_passwd = radius_info["password"] eap = "TLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, mode=mode, band=band, eap=eap, ttls_passwd=tls_passwd, identity=identity, diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py index 62dfab45fe3..63203079e35 100644 --- a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py +++ b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py @@ -121,7 +121,7 @@ def test_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_enterprise @pytest.mark.twog - def test_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa3_enterprise_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][0] @@ -133,9 +133,6 @@ def test_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", eap=eap, ttls_passwd=ttls_passwd, identity=identity, @@ -145,7 +142,7 @@ def test_wpa3_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_enterprise @pytest.mark.fiveg - def test_wpa3_enterprise_5g(self, get_vif_state,station_names_fiveg, get_ap_logs, get_lf_logs, + def test_wpa3_enterprise_5g(self, station_names_fiveg, get_ap_logs, get_lf_logs, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise["ssid_modes"]["wpa3_enterprise"][1] @@ -157,9 +154,6 @@ def test_wpa3_enterprise_5g(self, get_vif_state,station_names_fiveg, get_ap_logs ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, mode=mode, band=band, ieee80211w=2, key_mgmt="WPA-EAP-SHA256", eap=eap, ttls_passwd=ttls_passwd, identity=identity, @@ -195,7 +189,7 @@ class TestNATModeEnterpriseTTLSSuiteTwo(object): @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.twog - def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa_wpa2_enterprise_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][0] @@ -208,9 +202,6 @@ def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, mode=mode, band=band, eap=eap, ttls_passwd=ttls_passwd, identity=identity, @@ -220,7 +211,7 @@ def test_wpa_wpa2_enterprise_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa_wpa2_enterprise_mixed @pytest.mark.fiveg - def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa_wpa2_enterprise_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise_two["ssid_modes"]["wpa_wpa2_enterprise_mixed"][1] @@ -233,9 +224,6 @@ def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, extra_securities=extra_secu, mode=mode, band=band, eap=eap, ttls_passwd=ttls_passwd, identity=identity, @@ -245,7 +233,7 @@ def test_wpa_wpa2_enterprise_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_enterprise_mixed @pytest.mark.twog - def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa3_enterprise_mixed_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases, radius_info, exit_on_fail): profile_data = setup_params_enterprise_two["ssid_modes"]["wpa3_enterprise_mixed"][0] @@ -257,9 +245,6 @@ def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs, get_lf_logs, ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, mode=mode, band=band, eap=eap, ttls_passwd=ttls_passwd, identity=identity, @@ -269,7 +254,7 @@ def test_wpa3_enterprise_mixed_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_enterprise_mixed @pytest.mark.fiveg - def test_wpa3_enterprise_mixed_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa3_enterprise_mixed_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, setup_profiles, lf_test, update_report, exit_on_fail, test_cases, radius_info): @@ -282,9 +267,6 @@ def test_wpa3_enterprise_mixed_5g(self, get_vif_state, get_ap_logs, get_lf_logs, ttls_passwd = radius_info["password"] eap = "TTLS" identity = radius_info['user'] - 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") passes = lf_test.EAP_Connect(ssid=ssid_name, security=security, mode=mode, band=band, eap=eap, ttls_passwd=ttls_passwd, identity=identity, diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_general_security_modes.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_general_security_modes.py index 311411d1d64..31f97b48958 100644 --- a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_general_security_modes.py +++ b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_general_security_modes.py @@ -48,7 +48,7 @@ class TestNATModeConnectivitySuiteA(object): @pytest.mark.open @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_open_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_open_ssid_2g(self, get_ap_logs, get_lf_logs, setup_profiles, lf_test, update_report, station_names_twog, test_cases): @@ -64,10 +64,6 @@ def test_open_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "NAT" band = "twog" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -77,7 +73,7 @@ def test_open_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.open @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_open_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_open_ssid_5g(self, get_ap_logs, get_lf_logs, lf_test, test_cases, station_names_fiveg, update_report): """Client Connectivity open ssid 5G @@ -90,10 +86,6 @@ def test_open_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "NAT" band = "fiveg" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -104,7 +96,7 @@ def test_open_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa @pytest.mark.twog @allure.story('wpa 2.4 GHZ Band') - def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, update_report, get_lf_logs, + def test_wpa_ssid_2g(self, get_ap_logs, update_report, get_lf_logs, lf_test, test_cases, station_names_twog): """Client Connectivity wpa ssid 2.4G pytest -m "client_connectivity and NAT and general and wpa and twog" @@ -116,10 +108,6 @@ def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, update_report, get_lf_lo mode = "NAT" band = "twog" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -129,7 +117,7 @@ def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, update_report, get_lf_lo @pytest.mark.wpa @pytest.mark.fiveg @allure.story('wpa 5 GHZ Band') - def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa_ssid_5g(self, get_ap_logs, get_lf_logs, lf_test, update_report, test_cases, station_names_fiveg): """Client Connectivity wpa ssid 5G pytest -m "client_connectivity and NAT and general and wpa and fiveg" @@ -141,10 +129,6 @@ def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "NAT" band = "fiveg" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -155,7 +139,7 @@ def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa2_personal @pytest.mark.twog @allure.story('wpa2_personal 2.4 GHZ Band') - def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa2_personal_ssid_2g(self, get_ap_logs, get_lf_logs, lf_test, update_report, test_cases, station_names_twog): """Client Connectivity wpa2_personal ssid 2.4G @@ -168,10 +152,6 @@ def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "NAT" band = "twog" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -182,7 +162,7 @@ def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa2_personal @pytest.mark.fiveg @allure.story('wpa2_personal 5 GHZ Band') - def test_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa2_personal_ssid_5g(self, get_ap_logs, get_lf_logs, update_report, test_cases, station_names_fiveg, lf_test): @@ -196,10 +176,6 @@ def test_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "NAT" band = "fiveg" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -245,7 +221,7 @@ class TestNATModeConnectivitySuiteB(object): @pytest.mark.wpa3_personal @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa3_personal_ssid_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases): @@ -259,10 +235,6 @@ def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "NAT" band = "twog" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -272,7 +244,7 @@ def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_personal @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa3_personal_ssid_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G @@ -285,10 +257,6 @@ def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "NAT" band = "fiveg" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -298,7 +266,7 @@ def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_personal_mixed @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, + def test_wpa3_personal_mixed_ssid_2g(self, get_ap_logs, station_names_twog, setup_profiles, lf_test, get_lf_logs, update_report, @@ -313,10 +281,6 @@ def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, mode = "NAT" band = "twog" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -326,7 +290,7 @@ def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, @pytest.mark.wpa3_personal_mixed @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa3_personal_mixed_ssid_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, lf_test, test_cases, update_report): @@ -340,10 +304,6 @@ def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_lo mode = "NAT" band = "fiveg" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -353,7 +313,7 @@ def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_lo @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.twog @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band') - def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa_wpa2_personal_ssid_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, @@ -369,10 +329,6 @@ def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs mode = "NAT" band = "twog" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -382,7 +338,7 @@ def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.fiveg @allure.story('wpa wpa2 personal mixed 5 GHZ Band') - def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa_wpa2_personal_ssid_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G @@ -396,10 +352,6 @@ def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs mode = "NAT" band = "fiveg" vlan = 1 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) diff --git a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_general_security_modes.py b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_general_security_modes.py index 097703e2049..656f904335c 100644 --- a/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_general_security_modes.py +++ b/tests/e2e/basic/validation_of_operating_modes/vlan_mode/client_connectivity/test_general_security_modes.py @@ -46,7 +46,7 @@ class TestvlanModeConnectivitySuiteA(object): @pytest.mark.open @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_open_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_open_ssid_2g(self, get_ap_logs, get_lf_logs, setup_profiles, lf_test, update_report, station_names_twog, test_cases): @@ -60,10 +60,6 @@ def test_open_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "VLAN" band = "twog" vlan = 100 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -72,7 +68,7 @@ def test_open_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.open @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_open_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_open_ssid_5g(self, get_ap_logs, get_lf_logs, lf_test, test_cases, station_names_fiveg, update_report): """Client Connectivity open ssid 5G @@ -85,10 +81,6 @@ def test_open_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "VLAN" band = "fiveg" vlan = 100 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -99,7 +91,7 @@ def test_open_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa @pytest.mark.twog @allure.story('wpa 2.4 GHZ Band') - def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, + def test_wpa_ssid_2g(self, get_ap_logs, update_report, get_lf_logs, lf_test, test_cases, station_names_twog): """Client Connectivity wpa ssid 2.4G @@ -112,10 +104,6 @@ def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, mode = "VLAN" band = "twog" vlan = 100 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -126,7 +114,7 @@ def test_wpa_ssid_2g(self, get_vif_state, get_ap_logs, @pytest.mark.wpa @pytest.mark.fiveg @allure.story('wpa 5 GHZ Band') - def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa_ssid_5g(self, get_ap_logs, get_lf_logs, lf_test, update_report, test_cases, station_names_fiveg): """Client Connectivity wpa ssid 5G pytest -m "client_connectivity and vlan and general and wpa and fiveg" @@ -138,10 +126,6 @@ def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "VLAN" band = "fiveg" vlan = 100 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -152,7 +136,7 @@ def test_wpa_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa2_personal @pytest.mark.twog @allure.story('wpa2_personal 2.4 GHZ Band') - def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa2_personal_ssid_2g(self, get_ap_logs, get_lf_logs, lf_test, update_report, test_cases, station_names_twog): """Client Connectivity wpa2_personal ssid 2.4G @@ -165,10 +149,6 @@ def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "VLAN" band = "twog" vlan = 100 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -179,7 +159,7 @@ def test_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa2_personal @pytest.mark.fiveg @allure.story('wpa2_personal 5 GHZ Band') - def test_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa2_personal_ssid_5g(self, get_ap_logs, get_lf_logs, update_report, test_cases, station_names_fiveg, lf_test): @@ -193,10 +173,6 @@ def test_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "VLAN" band = "fiveg" vlan = 100 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -243,7 +219,7 @@ class TestvlanModeConnectivitySuiteTwo(object): @pytest.mark.wpa3_personal @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa3_personal_ssid_2g(self, get_ap_logs, get_lf_logs, station_names_twog, setup_profiles, lf_test, update_report, test_cases): @@ -257,10 +233,6 @@ def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "VLAN" band = "twog" vlan = 100 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -271,7 +243,7 @@ def test_wpa3_personal_ssid_2g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_personal @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa3_personal_ssid_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G @@ -284,10 +256,6 @@ def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, mode = "VLAN" band = "fiveg" vlan = 100 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -297,7 +265,7 @@ def test_wpa3_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, @pytest.mark.wpa3_personal_mixed @pytest.mark.twog @allure.story('open 2.4 GHZ Band') - def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, + def test_wpa3_personal_mixed_ssid_2g(self, get_ap_logs, station_names_twog, setup_profiles, lf_test, get_lf_logs, update_report, @@ -312,10 +280,6 @@ def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, mode = "VLAN" band = "twog" vlan = 100 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -325,7 +289,7 @@ def test_wpa3_personal_mixed_ssid_2g(self, get_vif_state, get_ap_logs, @pytest.mark.wpa3_personal_mixed @pytest.mark.fiveg @allure.story('open 5 GHZ Band') - def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, + def test_wpa3_personal_mixed_ssid_5g(self, get_ap_logs, station_names_fiveg, lf_test, test_cases, get_lf_logs, update_report): @@ -339,10 +303,6 @@ def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, mode = "VLAN" band = "fiveg" vlan = 100 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) @@ -352,7 +312,7 @@ def test_wpa3_personal_mixed_ssid_5g(self, get_vif_state, get_ap_logs, @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.twog @allure.story('wpa wpa2 personal mixed 2.4 GHZ Band') - def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, + def test_wpa_wpa2_personal_ssid_2g(self, get_ap_logs, station_names_twog, setup_profiles, lf_test, get_lf_logs, update_report, @@ -368,10 +328,6 @@ def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, mode = "VLAN" band = "twog" vlan = 100 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, passkey=security_key, mode=mode, band=band, station_name=station_names_twog, vlan_id=vlan) @@ -381,7 +337,7 @@ def test_wpa_wpa2_personal_ssid_2g(self, get_vif_state, get_ap_logs, @pytest.mark.wpa_wpa2_personal_mixed @pytest.mark.fiveg @allure.story('wpa wpa2 personal mixed 5 GHZ Band') - def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs, + def test_wpa_wpa2_personal_ssid_5g(self, get_ap_logs, get_lf_logs, station_names_fiveg, lf_test, test_cases, update_report): """Client Connectivity open ssid 2.4G @@ -395,10 +351,6 @@ def test_wpa_wpa2_personal_ssid_5g(self, get_vif_state, get_ap_logs, get_lf_logs mode = "VLAN" band = "fiveg" vlan = 100 - get_vif_state.append(ssid_name) - 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") passes, result = lf_test.Client_Connectivity(ssid=ssid_name, security=security, extra_securities=extra_secu, passkey=security_key, mode=mode, band=band, station_name=station_names_fiveg, vlan_id=vlan) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py index 5af4d603a7a..865e8b34739 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py @@ -556,3 +556,86 @@ def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_ else: allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) assert False + + +setup_params_general1 = { + "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": + {'band': '5G', + 'country': 'Us', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 36}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +for sec_modes in setup_params_general1['ssid_modes'].keys(): + for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +# @allure.suite(suite_name="interop country code") +# @allure.sub_suite(sub_suite_name="Bridge Mode country code") +# @pytest.mark.InteropsuiteA +# @allure.feature("BRIDGE MODE CLIENT CONNECT") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteOne(object): + """ Client Connect SuiteOne + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.fiction + def test_ClientConnect_bridge_wpa2_chn36_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py index b0afb5f77e3..a99566b0638 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/android/test_general_security_modes.py @@ -288,16 +288,16 @@ def test_ClientConnect_2g_Open_Vlan(self, request, get_vif_state, get_ap_logs, g "mode": "VLAN", "ssid_modes": { "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_5g_vlan", "appliedRadios": ["5G"], + {"ssid_name": "wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "wpa3_p_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], + {"ssid_name": "wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], + {"ssid_name": "wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}] }, "rf": {}, diff --git a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_general_security_mode.py b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_general_security_mode.py index ceeb97b86d9..b79b8c027cb 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_general_security_mode.py +++ b/tests/e2e/interOp/validation_of_operating_modes/vlan_mode/client_connect_test/iOS/test_general_security_mode.py @@ -284,16 +284,16 @@ def test_ClientConnect_2g_Open_VLAN(self, request, get_vif_state, get_ap_logs, g "mode": "VLAN", "ssid_modes": { "wpa3_personal": [ - {"ssid_name": "ssid_wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_5g_vlan", "appliedRadios": ["5G"], + {"ssid_name": "wpa3_p_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "wpa3_p_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], "wpa3_personal_mixed": [ - {"ssid_name": "ssid_wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], + {"ssid_name": "wpa3_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "wpa3_p_m_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}], "wpa_wpa2_personal_mixed": [ - {"ssid_name": "ssid_wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, - {"ssid_name": "ssid_wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], + {"ssid_name": "wpa_wpa2_p_m_2g_vlan", "appliedRadios": ["2G"], "security_key": "something", "vlan": 100}, + {"ssid_name": "wpa_wpa2_p_m_5g_vlan", "appliedRadios": ["5G"], "security_key": "something", "vlan": 100}] }, "rf": {}, diff --git a/tests/fixtures_2x.py b/tests/fixtures_2x.py index 0e9d3aa022c..93da5350cf1 100644 --- a/tests/fixtures_2x.py +++ b/tests/fixtures_2x.py @@ -380,11 +380,6 @@ def setup_profiles(self, request, param, setup_controller, testbed, get_equipmen test_cases = {} profile_data = {} var = "" - list_key = list(parameter.keys()) - - if "dfs" in list_key: - print("In dfs") - instantiate_profile_obj.set_radio_config(DFS=True, channel=parameter["dfs"]["channel"], bw=parameter["dfs"]["channel_bandwidth"]) if len(parameter['rf']) > 0: print("Country code channel division") instantiate_profile_obj.set_radio_config(radio_config=parameter['rf']) @@ -758,8 +753,7 @@ def setup_profiles(self, request, param, setup_controller, testbed, get_equipmen else: print("AP is Not Broadcasting Applied Config") allure.attach(name="Failed to Apply Config : Active Config in AP : ", body=str(ap_config_active)) - time.sleep(10) - + time.sleep(50) try: iwinfo = ap_ssh.iwinfo() allure.attach(name="iwinfo: ", body=str(iwinfo)) From 0112ce88f957574015cbb7806330aed6191b83a5 Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Sun, 24 Apr 2022 17:26:57 +0530 Subject: [PATCH 03/14] Removed unwanted code Signed-off-by: Jyothsna-setti --- .../test_general_security_modes.py | 1 - .../iOS/test_general_security_modes.py | 81 ------------------- 2 files changed, 82 deletions(-) diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py index 2272a10ee34..7681ba0e442 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_general_security_modes.py @@ -48,7 +48,6 @@ class TestBridgeModeConnectivitySuiteA(object): @pytest.mark.open @pytest.mark.twog - @pytest.mark.hari @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-2809", name="JIRA LINK") def test_open_ssid_2g(self, get_ap_logs, get_lf_logs, lf_test, update_report, diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py index 865e8b34739..aa9ea09e141 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py @@ -558,84 +558,3 @@ def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_ assert False -setup_params_general1 = { - "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": - {'band': '5G', - 'country': 'Us', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -# @allure.suite(suite_name="interop country code") -# @allure.sub_suite(sub_suite_name="Bridge Mode country code") -# @pytest.mark.InteropsuiteA -# @allure.feature("BRIDGE MODE CLIENT CONNECT") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.fiction - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - From bcec9cc0d5e29466859aca392b3281595add7909 Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Sun, 24 Apr 2022 20:51:21 +0530 Subject: [PATCH 04/14] Removed unwanted markers and made some changes in country code SG(android) Signed-off-by: Jyothsna-setti --- .../channel_code_SG/android/test_SG_20mhz.py | 1710 +++++++++++++++++ .../channel_code_SG/android/test_SG_40mhz.py | 1152 +++++++++++ .../channel_code_SG/android/test_SG_80mhz.py | 1019 ++++++++++ 3 files changed, 3881 insertions(+) create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_20mhz.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_40mhz.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_80mhz.py diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_20mhz.py new file mode 100644 index 00000000000..bfe51613c6c --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_20mhz.py @@ -0,0 +1,1710 @@ +from logging import exception +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException +import random +import string +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_codeSG1 + , pytest.mark.bridge] + +from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and + +setup_params_general1 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 36}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +for sec_modes in setup_params_general1['ssid_modes'].keys(): + for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteOne(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn36_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn1_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general2 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 40}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 2} + }, + "radius": False +} + +for sec_modes in setup_params_general2['ssid_modes'].keys(): + for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTwo(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn40_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.japan + def test_ClientConnect_bridge_wpa2_chn2_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general3 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 44}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 3} + }, + "radius": False +} + +for sec_modes in setup_params_general3['ssid_modes'].keys(): + for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteThree(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn44_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn3_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general4 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 48}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 4} + }, + "radius": False +} + +for sec_modes in setup_params_general4['ssid_modes'].keys(): + for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFour(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn48_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn4_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general5 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 52}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 5} + }, + "radius": False +} + +for sec_modes in setup_params_general5['ssid_modes'].keys(): + for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFive(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn52_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn5_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general6 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 56}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 6} + }, + "radius": False +} + +for sec_modes in setup_params_general6['ssid_modes'].keys(): + for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSix(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn56_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn6_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general7 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 60}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 7} + }, + "radius": False +} + +for sec_modes in setup_params_general7['ssid_modes'].keys(): + for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSeven(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn60_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn7_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general8 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 64}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 8} + }, + "radius": False +} + +for sec_modes in setup_params_general8['ssid_modes'].keys(): + for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEight(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn64_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn8_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general9 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 9} + }, + "radius": False +} + +for sec_modes in setup_params_general9['ssid_modes'].keys(): + for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteNine(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn100_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn9_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general10 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 104}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 10} + }, + "radius": False +} + +for sec_modes in setup_params_general10['ssid_modes'].keys(): + for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTen(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn104_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn10_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general11 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 11} + }, + "radius": False +} + +for sec_modes in setup_params_general11['ssid_modes'].keys(): + for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEleven(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn108_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn11_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general12 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 112}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general12['ssid_modes'].keys(): + for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTwelve(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn112_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general13 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 116}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general13['ssid_modes'].keys(): + for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteThirteen(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn116_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general14 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 132}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general14['ssid_modes'].keys(): + for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFourteen(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn132_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general15 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 136}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general15['ssid_modes'].keys(): + for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFifteen(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn136_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general16 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 140}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general16['ssid_modes'].keys(): + for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSixteen(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn140_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general17 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 144}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general17['ssid_modes'].keys(): + for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSeventeen(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn144_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_40mhz.py new file mode 100644 index 00000000000..ea399918429 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_40mhz.py @@ -0,0 +1,1152 @@ +from logging import exception +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException +import random +import string +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_codeSG2 + , pytest.mark.bridge] + +from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and + +setup_params_general1 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 36}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 1} + }, + "radius": False +} + +for sec_modes in setup_params_general1['ssid_modes'].keys(): + for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteOne(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn36_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn1_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general2 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 44}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 2} + }, + "radius": False +} + +for sec_modes in setup_params_general2['ssid_modes'].keys(): + for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTwo(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn44_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn2_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general3 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 52}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 3} + }, + "radius": False +} + +for sec_modes in setup_params_general3['ssid_modes'].keys(): + for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteThree(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn52_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn3_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general4 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 60}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 4} + }, + "radius": False +} + +for sec_modes in setup_params_general4['ssid_modes'].keys(): + for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFour(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn60_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn4_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general5 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 5} + }, + "radius": False +} + +for sec_modes in setup_params_general5['ssid_modes'].keys(): + for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFive(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn100_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn5_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general6 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 6} + }, + "radius": False +} + +for sec_modes in setup_params_general6['ssid_modes'].keys(): + for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSix(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn108_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn6_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general7 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 132}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 7} + }, + "radius": False +} + +for sec_modes in setup_params_general7['ssid_modes'].keys(): + for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSeven(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn132_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn7_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general8 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 140}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 8} + }, + "radius": False +} + +for sec_modes in setup_params_general8['ssid_modes'].keys(): + for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEight(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn140_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn8_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general9 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 9} + }, + "radius": False +} + +for sec_modes in setup_params_general9['ssid_modes'].keys(): + for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteNine(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn9_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general10 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 104}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 10} + }, + "radius": False +} + +for sec_modes in setup_params_general10['ssid_modes'].keys(): + for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTen(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn10_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general11 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 11} + }, + "radius": False +} + +for sec_modes in setup_params_general11['ssid_modes'].keys(): + for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEleven(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.plott + def test_ClientConnect_bridge_wpa2_chn11_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_80mhz.py new file mode 100644 index 00000000000..cd99630e80c --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_80mhz.py @@ -0,0 +1,1019 @@ +from logging import exception +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException +import random +import string +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_codeSG3 + , pytest.mark.bridge] + +from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and + +setup_params_general1 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 36}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 1} + }, + "radius": False +} + +for sec_modes in setup_params_general1['ssid_modes'].keys(): + for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteOne(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn36_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn1_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general2 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 52}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 2} + }, + "radius": False +} + +for sec_modes in setup_params_general2['ssid_modes'].keys(): + for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTwo(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn52_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn2_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general3 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 3} + }, + "radius": False +} + +for sec_modes in setup_params_general3['ssid_modes'].keys(): + for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteThree(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn100_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn3_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general4 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 132}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 4} + }, + "radius": False +} + +for sec_modes in setup_params_general4['ssid_modes'].keys(): + for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFour(object): + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn48_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn4_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general5 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 52}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 5} + }, + "radius": False +} + +for sec_modes in setup_params_general5['ssid_modes'].keys(): + for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFive(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn5_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general6 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 56}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 6} + }, + "radius": False +} + +for sec_modes in setup_params_general6['ssid_modes'].keys(): + for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSix(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn6_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general7 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 60}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 7} + }, + "radius": False +} + +for sec_modes in setup_params_general7['ssid_modes'].keys(): + for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSeven(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn7_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general8 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 64}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 8} + }, + "radius": False +} + +for sec_modes in setup_params_general8['ssid_modes'].keys(): + for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEight(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn8_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general9 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 9} + }, + "radius": False +} + +for sec_modes in setup_params_general9['ssid_modes'].keys(): + for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteNine(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn9_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general10 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 104}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 10} + }, + "radius": False +} + +for sec_modes in setup_params_general10['ssid_modes'].keys(): + for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTen(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn10_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general11 = { + "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": + {'band': '5G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'SG', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 11} + }, + "radius": False +} + +for sec_modes in setup_params_general11['ssid_modes'].keys(): + for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEleven(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") + @pytest.mark.twog + @pytest.mark.wpa2_personal + def test_ClientConnect_bridge_wpa2_chn11_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_android): + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_android[1] + driver = setup_perfectoMobile_android[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + From 130c33f821168d362a4b01b1ece1b2339dd40268 Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Mon, 25 Apr 2022 11:37:13 +0530 Subject: [PATCH 05/14] Removed unwanted files Signed-off-by: Jyothsna-setti --- .../channel_code_SG/android/test_SG_20mhz.py | 1710 ----------------- .../channel_code_SG/android/test_SG_40mhz.py | 1152 ----------- .../channel_code_SG/android/test_SG_80mhz.py | 1019 ---------- 3 files changed, 3881 deletions(-) delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_20mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_40mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_80mhz.py diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_20mhz.py deleted file mode 100644 index bfe51613c6c..00000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_20mhz.py +++ /dev/null @@ -1,1710 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_codeSG1 - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.japan - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7603", name="WIFI-7603") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general17 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7597", name="WIFI-7597") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_40mhz.py deleted file mode 100644 index ea399918429..00000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_40mhz.py +++ /dev/null @@ -1,1152 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_codeSG2 - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7599", name="WIFI-7599") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7592", name="WIFI-7592") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.plott - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_RU_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_80mhz.py deleted file mode 100644 index cd99630e80c..00000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/channel_code_SG/android/test_SG_80mhz.py +++ /dev/null @@ -1,1019 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_codeSG3 - , pytest.mark.bridge] - -from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp, get_ip_address_and - -setup_params_general1 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7304", name="WIFI-7304") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn48_80Mhz_SG_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "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": - {'band': '5G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'SG', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(SG)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE SG") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7593", name="WIFI-7593") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_SG_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_android): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_android[1] - driver = setup_perfectoMobile_android[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_and(request, ssidName, ssidPassword, setup_perfectoMobile_android, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - From 7d39e07b9b7e24d259ad7c35a2fe715fa4c2e05c Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Mon, 25 Apr 2022 12:42:45 +0530 Subject: [PATCH 06/14] Removed unnecessary spaces in test_general_security_modes Signed-off-by: Jyothsna-setti --- .../client_connect_test/iOS/test_general_security_modes.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py index aa9ea09e141..47903783238 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/iOS/test_general_security_modes.py @@ -555,6 +555,4 @@ def test_ClientConnect_2g_wpa_wpa2_personal_mixed_Bridge(self, request, get_vif_ assert True else: allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - + assert False \ No newline at end of file From 1b9d372462fba33f1764809a9ee764add489a7f4 Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Mon, 25 Apr 2022 14:56:22 +0530 Subject: [PATCH 07/14] Added a new marker in country code JP(IOS) Signed-off-by: Jyothsna-setti --- .../country_code_JP/iOS/test_JP_20Mhz.py | 1747 +++++++++++++++++ .../country_code_JP/iOS/test_JP_40Mhz.py | 1164 +++++++++++ .../country_code_JP/iOS/test_JP_80Mhz.py | 1030 ++++++++++ 3 files changed, 3941 insertions(+) create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_20Mhz.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_40Mhz.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_80Mhz.py diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_20Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_20Mhz.py new file mode 100644 index 00000000000..0947c801366 --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_20Mhz.py @@ -0,0 +1,1747 @@ +from logging import exception +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException +import random +import string +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_JP, pytest.mark.interop_country_code + , pytest.mark.bridge] + +from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ + Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ + verifyUploadDownloadSpeediOS, get_ip_address_ios + + +setup_params_general1 = { + "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": + {'band': '5G', + 'country': 'Us', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 36}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +for sec_modes in setup_params_general1['ssid_modes'].keys(): + for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteOne(object): + """ Client Connect SuiteOne + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn36_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn1_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general2 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 40}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 2} + }, + "radius": False +} + +for sec_modes in setup_params_general2['ssid_modes'].keys(): + for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTwo(object): + """ Client Connect SuiteTwo + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn40_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn2_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general3 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 44}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 3} + }, + "radius": False +} + +for sec_modes in setup_params_general3['ssid_modes'].keys(): + for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteThree(object): + """ Client Connect SuiteThree """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn44_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn3_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general4 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 48}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 4} + }, + "radius": False +} + +for sec_modes in setup_params_general4['ssid_modes'].keys(): + for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFour(object): + """ Client Connect SuiteFour """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn48_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn4_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general5 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 52}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 5} + }, + "radius": False +} + +for sec_modes in setup_params_general5['ssid_modes'].keys(): + for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFive(object): + """ Client Connect SuiteFive """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn52_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn5_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general6 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 56}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 6} + }, + "radius": False +} + +for sec_modes in setup_params_general6['ssid_modes'].keys(): + for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSix(object): + """ Client Connect SuiteSix """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn56_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn6_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general7 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 60}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 7} + }, + "radius": False +} + +for sec_modes in setup_params_general7['ssid_modes'].keys(): + for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSeven(object): + """ Client Connect SuiteSeven """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn60_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn7_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general8 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 64}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 8} + }, + "radius": False +} + +for sec_modes in setup_params_general8['ssid_modes'].keys(): + for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEight(object): + """ Client Connect SuiteEight """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn64_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn8_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general9 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 9} + }, + "radius": False +} + +for sec_modes in setup_params_general9['ssid_modes'].keys(): + for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteNine(object): + """ Client Connect SuiteNine """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn100_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn9_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general10 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 104}, + "2G": + {'band': '2G', + 'country': 'USP', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 10} + }, + "radius": False +} + +for sec_modes in setup_params_general10['ssid_modes'].keys(): + for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTen(object): + """ Client Connect SuiteTen """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn104_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn10_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general11 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 11} + }, + "radius": False +} + +for sec_modes in setup_params_general11['ssid_modes'].keys(): + for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEleven(object): + """ Client Connect SuiteEleven """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.plot + def test_ClientConnect_bridge_wpa2_chn108_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.plot + def test_ClientConnect_bridge_wpa2_chn11_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general12 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 112}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general12['ssid_modes'].keys(): + for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTwelve(object): + """ Client Connect SuiteTwelve """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.subbu + def test_ClientConnect_bridge_wpa2_chn112_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general13 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 116}, + "2G": + {'band': '2G', + 'country': 'USP', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general13['ssid_modes'].keys(): + for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteThirteen(object): + """ Client Connect SuiteThirteen """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.subbu + def test_ClientConnect_bridge_wpa2_chn116_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general14 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 132}, + "2G": + {'band': '2G', + 'country': 'USP', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general14['ssid_modes'].keys(): + for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFourteen(object): + """ Client Connect SuiteFourteen """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.subbu + def test_ClientConnect_bridge_wpa2_chn132_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general15 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 136}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general15['ssid_modes'].keys(): + for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFifteen(object): + """ Client Connect SuiteFifteen """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.subbu + def test_ClientConnect_bridge_wpa2_chn136_20Mhz_USP_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general16 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 140}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general16['ssid_modes'].keys(): + for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSixteen(object): + """ Client Connect SuiteSixteen """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + @pytest.mark.twenty + def test_ClientConnect_bridge_wpa2_chn140_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general17 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 144}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general17['ssid_modes'].keys(): + for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSeventeen(object): + """ Client Connect SuiteSeventeen """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn144_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_40Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_40Mhz.py new file mode 100644 index 00000000000..420d475142d --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_40Mhz.py @@ -0,0 +1,1164 @@ +from logging import exception +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException +import random +import string +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_JP, pytest.mark.interop_country_code + , pytest.mark.bridge] + +from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ + Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ + verifyUploadDownloadSpeediOS, get_ip_address_ios + +setup_params_general1 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 36}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 1} + }, + "radius": False +} + +for sec_modes in setup_params_general1['ssid_modes'].keys(): + for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteOne(object): + """ Client Connect SuiteOne """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn36_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn1_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general2 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 44}, + "2G": + {'band': '2G', + 'country': 'USP', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 2} + }, + "radius": False +} + +for sec_modes in setup_params_general2['ssid_modes'].keys(): + for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTwo(object): + """ Client Connect SuiteTwo """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn44_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn2_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general3 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 52}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 3} + }, + "radius": False +} + +for sec_modes in setup_params_general3['ssid_modes'].keys(): + for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteThree(object): + """ Client Connect SuiteThree """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn52_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn3_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general4 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 60}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 4} + }, + "radius": False +} + +for sec_modes in setup_params_general4['ssid_modes'].keys(): + for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFour(object): + """ Client Connect SuiteFour """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn60_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn4_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general5 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 5} + }, + "radius": False +} + +for sec_modes in setup_params_general5['ssid_modes'].keys(): + for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFive(object): + """ Client Connect SuiteFuve """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn100_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn5_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general6 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 6} + }, + "radius": False +} + +for sec_modes in setup_params_general6['ssid_modes'].keys(): + for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSix(object): + """ Client Connect SuiteSix """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn108_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn6_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general7 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 132}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 7} + }, + "radius": False +} + +for sec_modes in setup_params_general7['ssid_modes'].keys(): + for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSeven(object): + """ Client Connect SuiteSeven """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn132_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn7_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general8 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 140}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 8} + }, + "radius": False +} + +for sec_modes in setup_params_general8['ssid_modes'].keys(): + for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEight(object): + """ Client Connect SuiteEight """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn140_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn8_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general9 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 9} + }, + "radius": False +} + +for sec_modes in setup_params_general9['ssid_modes'].keys(): + for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteNine(object): + """ Client Connect SuiteEight """ + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn9_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general10 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 104}, + "2G": + {'band': '2G', + 'country': 'USP', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 10} + }, + "radius": False +} + +for sec_modes in setup_params_general10['ssid_modes'].keys(): + for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTen(object): + """ Client Connect SuiteEight """ + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn10_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general11 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 11} + }, + "radius": False +} + +for sec_modes in setup_params_general11['ssid_modes'].keys(): + for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEleven(object): + """ Client Connect SuiteEight """ + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") + @pytest.mark.twog + @pytest.mark.wpa2_personal + def test_ClientConnect_bridge_wpa2_chn11_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_80Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_80Mhz.py new file mode 100644 index 00000000000..3a32526deec --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_80Mhz.py @@ -0,0 +1,1030 @@ +from logging import exception +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException +import random +import string +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_JP, pytest.mark.interop_country_code + , pytest.mark.bridge] + +from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ + Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ + verifyUploadDownloadSpeediOS, get_ip_address_ios + +setup_params_general1 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 36}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 1} + }, + "radius": False +} + +for sec_modes in setup_params_general1['ssid_modes'].keys(): + for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteOne(object): + """ Client Connect SuiteOne """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn36_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn1_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general2 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 52}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 2} + }, + "radius": False +} + +for sec_modes in setup_params_general2['ssid_modes'].keys(): + for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTwo(object): + """ Client Connect SuiteTwo """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn52_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") + @pytest.mark.twog + @pytest.mark.wpa2_personal + def test_ClientConnect_bridge_wpa2_chn2_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general3 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 3} + }, + "radius": False +} + +for sec_modes in setup_params_general3['ssid_modes'].keys(): + for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteThree(object): + """ Client Connect SuiteThree """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn100_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn3_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general4 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 132}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 4} + }, + "radius": False +} + +for sec_modes in setup_params_general4['ssid_modes'].keys(): + for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFour(object): + """ Client Connect SuiteFour """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn48_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn4_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general5 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 52}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 5} + }, + "radius": False +} + +for sec_modes in setup_params_general5['ssid_modes'].keys(): + for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFive(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn5_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general6 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 56}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 6} + }, + "radius": False +} + +for sec_modes in setup_params_general6['ssid_modes'].keys(): + for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSix(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn6_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general7 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 60}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 7} + }, + "radius": False +} + +for sec_modes in setup_params_general7['ssid_modes'].keys(): + for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSeven(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn7_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general8 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 64}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 8} + }, + "radius": False +} + +for sec_modes in setup_params_general8['ssid_modes'].keys(): + for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEight(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn8_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general9 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 9} + }, + "radius": False +} + +for sec_modes in setup_params_general9['ssid_modes'].keys(): + for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteNine(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + @pytest.mark.thirdrun + def test_ClientConnect_bridge_wpa2_chn9_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general10 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 104}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 10} + }, + "radius": False +} + +for sec_modes in setup_params_general10['ssid_modes'].keys(): + for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTen(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn10_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general11 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 11} + }, + "radius": False +} + +for sec_modes in setup_params_general11['ssid_modes'].keys(): + for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEleven(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn11_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + From 420077cd34f5c65a27f3b713e3cbb9d2d8c35d04 Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Mon, 25 Apr 2022 14:59:05 +0530 Subject: [PATCH 08/14] removed unnecessary files Signed-off-by: Jyothsna-setti --- .../country_code_JP/iOS/test_JP_20Mhz.py | 1747 ----------------- .../country_code_JP/iOS/test_JP_40Mhz.py | 1164 ----------- .../country_code_JP/iOS/test_JP_80Mhz.py | 1030 ---------- 3 files changed, 3941 deletions(-) delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_20Mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_40Mhz.py delete mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_80Mhz.py diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_20Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_20Mhz.py deleted file mode 100644 index 0947c801366..00000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_20Mhz.py +++ /dev/null @@ -1,1747 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_JP, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - - -setup_params_general1 = { - "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": - {'band': '5G', - 'country': 'Us', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn36_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn1_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 40}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo - """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn40_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn2_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn44_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn3_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 48}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn48_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn4_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFive """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn52_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn5_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn56_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn6_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn60_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn7_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn64_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn8_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general9], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteNine """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn100_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn9_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'USP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general10], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteTen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn104_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn10_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general11], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEleven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.plot - def test_ClientConnect_bridge_wpa2_chn108_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7650", name="WIFI-7650") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.plot - def test_ClientConnect_bridge_wpa2_chn11_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general12 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 112}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general12['ssid_modes'].keys(): - for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general12], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwelve(object): - """ Client Connect SuiteTwelve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.subbu - def test_ClientConnect_bridge_wpa2_chn112_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general13 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 116}, - "2G": - {'band': '2G', - 'country': 'USP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general13['ssid_modes'].keys(): - for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general13], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThirteen(object): - """ Client Connect SuiteThirteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.subbu - def test_ClientConnect_bridge_wpa2_chn116_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general14 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'USP', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general14['ssid_modes'].keys(): - for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general14], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFourteen(object): - """ Client Connect SuiteFourteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.subbu - def test_ClientConnect_bridge_wpa2_chn132_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general15 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 136}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general15['ssid_modes'].keys(): - for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general15], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFifteen(object): - """ Client Connect SuiteFifteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.subbu - def test_ClientConnect_bridge_wpa2_chn136_20Mhz_USP_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general16 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general16['ssid_modes'].keys(): - for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general16], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSixteen(object): - """ Client Connect SuiteSixteen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - @pytest.mark.twenty - def test_ClientConnect_bridge_wpa2_chn140_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general17 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 144}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 20, - "channel": 12} - }, - "radius": False -} - -for sec_modes in setup_params_general17['ssid_modes'].keys(): - for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general17], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeventeen(object): - """ Client Connect SuiteSeventeen """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7659", name="WIFI-7659") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.twentyMhz - def test_ClientConnect_bridge_wpa2_chn144_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_40Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_40Mhz.py deleted file mode 100644 index 420d475142d..00000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_40Mhz.py +++ /dev/null @@ -1,1164 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_JP, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - -setup_params_general1 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn36_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn1_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 44}, - "2G": - {'band': '2G', - 'country': 'USP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn44_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn2_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn52_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn3_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn60_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn4_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general5], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - """ Client Connect SuiteFuve """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn100_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn5_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general6], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - """ Client Connect SuiteSix """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn108_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn6_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general7], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - """ Client Connect SuiteSeven """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn132_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn7_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 140}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - """ Client Connect SuiteEight """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7664", name="WIFI-7664") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn140_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn8_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - """ Client Connect SuiteEight """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn9_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'USP', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - """ Client Connect SuiteEight """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.fourtyMhz - def test_ClientConnect_bridge_wpa2_chn10_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 40, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general8], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - """ Client Connect SuiteEight """ - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7651", name="WIFI-7651") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn11_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_80Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_80Mhz.py deleted file mode 100644 index 3a32526deec..00000000000 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_JP/iOS/test_JP_80Mhz.py +++ /dev/null @@ -1,1030 +0,0 @@ -from logging import exception -import unittest -import warnings -from perfecto.test import TestResultFactory -import pytest -import sys -import time -from selenium.common.exceptions import NoSuchElementException -from selenium.webdriver.common.by import By -from appium import webdriver -from selenium.common.exceptions import NoSuchElementException -import random -import string -import sys -import allure - -if 'perfecto_libs' not in sys.path: - sys.path.append(f'../libs/perfecto_libs') - -pytestmark = [pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.interop_country_code_JP, pytest.mark.interop_country_code - , pytest.mark.bridge] - -from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ - Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ - verifyUploadDownloadSpeediOS, get_ip_address_ios - -setup_params_general1 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 36}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 1} - }, - "radius": False -} - -for sec_modes in setup_params_general1['ssid_modes'].keys(): - for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general1], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteOne(object): - """ Client Connect SuiteOne """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn36_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn1_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general2 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 2} - }, - "radius": False -} - -for sec_modes in setup_params_general2['ssid_modes'].keys(): - for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general2], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTwo(object): - """ Client Connect SuiteTwo """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn52_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - def test_ClientConnect_bridge_wpa2_chn2_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general3 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 3} - }, - "radius": False -} - -for sec_modes in setup_params_general3['ssid_modes'].keys(): - for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general3], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteThree(object): - """ Client Connect SuiteThree """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn100_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn3_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general4 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 132}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 4} - }, - "radius": False -} - -for sec_modes in setup_params_general4['ssid_modes'].keys(): - for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFour(object): - """ Client Connect SuiteFour """ - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7292", name="WIFI-7292") - @pytest.mark.fiveg - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn48_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn4_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general5 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 52}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 5} - }, - "radius": False -} - -for sec_modes in setup_params_general5['ssid_modes'].keys(): - for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteFive(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn5_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general6 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 56}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 6} - }, - "radius": False -} - -for sec_modes in setup_params_general6['ssid_modes'].keys(): - for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSix(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn6_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general7 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 60}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 7} - }, - "radius": False -} - -for sec_modes in setup_params_general7['ssid_modes'].keys(): - for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteSeven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn7_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general8 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 64}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 8} - }, - "radius": False -} - -for sec_modes in setup_params_general8['ssid_modes'].keys(): - for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEight(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn8_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general9 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 100}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 9} - }, - "radius": False -} - -for sec_modes in setup_params_general9['ssid_modes'].keys(): - for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteNine(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - @pytest.mark.thirdrun - def test_ClientConnect_bridge_wpa2_chn9_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - -setup_params_general10 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 104}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 10} - }, - "radius": False -} - -for sec_modes in setup_params_general10['ssid_modes'].keys(): - for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteTen(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn10_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - -setup_params_general11 = { - "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": - {'band': '5G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 108}, - "2G": - {'band': '2G', - 'country': 'US', - "channel-mode": "VHT", - 'channel-width': 80, - "channel": 11} - }, - "radius": False -} - -for sec_modes in setup_params_general11['ssid_modes'].keys(): - for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): - N = 3 - rand_string = (''.join(random.choices(string.ascii_uppercase + - string.digits, k=N)))+str(int(time.time_ns())%10000) - setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string - - -@allure.suite(suite_name="interop country code") -@allure.sub_suite(sub_suite_name="Bridge Mode country code(JP)") -@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE JP") -@pytest.mark.parametrize( - 'setup_profiles', - [setup_params_general4], - indirect=True, - scope="class" -) -@pytest.mark.usefixtures("setup_profiles") -class TestBridgeModeConnectSuiteEleven(object): - - - @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7652", name="WIFI-7652") - @pytest.mark.twog - @pytest.mark.wpa2_personal - @pytest.mark.eightyMhz - def test_ClientConnect_bridge_wpa2_chn11_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, - get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): - profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] - ssidName = profile_data["ssid_name"] - ssidPassword = profile_data["security_key"] - print("SSID_NAME: " + ssidName) - print("SSID_PASS: " + ssidPassword) - get_vif_state.append(ssidName) - if ssidName 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") - - report = setup_perfectoMobile_iOS[1] - driver = setup_perfectoMobile_iOS[0] - connData = get_ToggleAirplaneMode_data - - # Set Wifi/AP Mode - ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) - - if ip: - if is_internet: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") - else: - text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") - print(text_body) - allure.attach(name="Connection Status: ", body=str(text_body)) - assert True - else: - allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) - assert False - - From 250ed4f2ca4a699b99d7d6299be215fe9bbe5ab8 Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Mon, 25 Apr 2022 16:38:25 +0530 Subject: [PATCH 09/14] added a new marker in country US(IOS) Signed-off-by: Jyothsna-setti --- .../country_code_US/iOS/test_US_20mhz.py | 1729 +++++++++++++++++ .../country_code_US/iOS/test_US_40mhz.py | 1166 +++++++++++ .../country_code_US/iOS/test_US_80mhz.py | 1028 ++++++++++ 3 files changed, 3923 insertions(+) create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_20mhz.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_40mhz.py create mode 100644 tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_80mhz.py diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_20mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_20mhz.py new file mode 100644 index 00000000000..7830234426a --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_20mhz.py @@ -0,0 +1,1729 @@ +from logging import exception +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException +import random +import string +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_US, pytest.mark.interop_country_code, + pytest.mark.bridge] + + +from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ + Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ + verifyUploadDownloadSpeediOS, get_ip_address_ios + + +setup_params_general1 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 36}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 1} + }, + "radius": False +} + +for sec_modes in setup_params_general1['ssid_modes'].keys(): + for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteOne(object): + """ Client Connect SuiteOne + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn36_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn1_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general2 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 40}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 2} + }, + "radius": False +} + +for sec_modes in setup_params_general2['ssid_modes'].keys(): + for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTwo(object): + """ Client Connect SuiteTwo + """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn40_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn2_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general3 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 44}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 3} + }, + "radius": False +} + +for sec_modes in setup_params_general3['ssid_modes'].keys(): + for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteThree(object): + """ Client Connect SuiteThree """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn44_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn3_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general4 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 48}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 4} + }, + "radius": False +} + +for sec_modes in setup_params_general4['ssid_modes'].keys(): + for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFour(object): + """ Client Connect SuiteFour """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn48_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn4_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general5 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 52}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 5} + }, + "radius": False +} + +for sec_modes in setup_params_general5['ssid_modes'].keys(): + for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFive(object): + """ Client Connect SuiteFive """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn52_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn5_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general6 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 56}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 6} + }, + "radius": False +} + +for sec_modes in setup_params_general6['ssid_modes'].keys(): + for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSix(object): + """ Client Connect SuiteSix """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn56_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn6_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general7 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 60}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 7} + }, + "radius": False +} + +for sec_modes in setup_params_general7['ssid_modes'].keys(): + for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSeven(object): + """ Client Connect SuiteSeven """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn60_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn7_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general8 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 64}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 8} + }, + "radius": False +} + +for sec_modes in setup_params_general8['ssid_modes'].keys(): + for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEight(object): + """ Client Connect SuiteEight """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn64_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn8_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general9 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 9} + }, + "radius": False +} + +for sec_modes in setup_params_general9['ssid_modes'].keys(): + for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteNine(object): + """ Client Connect SuiteNine """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn100_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn9_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general10 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 104}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 10} + }, + "radius": False +} + +for sec_modes in setup_params_general10['ssid_modes'].keys(): + for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTen(object): + """ Client Connect SuiteTen """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn104_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn10_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general11 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 11} + }, + "radius": False +} + +for sec_modes in setup_params_general11['ssid_modes'].keys(): + for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEleven(object): + """ Client Connect SuiteEleven """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn108_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7641", name="WIFI-7641") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn11_20Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general12 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 112}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general12['ssid_modes'].keys(): + for i in range(len(setup_params_general12['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general12['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general12], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTwelve(object): + """ Client Connect SuiteTwelve """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn112_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general12["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general13 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 116}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general13['ssid_modes'].keys(): + for i in range(len(setup_params_general13['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general13['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general13], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteThirteen(object): + """ Client Connect SuiteThirteen """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn116_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general13["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general14 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 132}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general14['ssid_modes'].keys(): + for i in range(len(setup_params_general14['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general14['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general14], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFourteen(object): + """ Client Connect SuiteFourteen """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn132_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general14["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general15 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 136}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general15['ssid_modes'].keys(): + for i in range(len(setup_params_general15['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general15['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general15], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFifteen(object): + """ Client Connect SuiteFifteen """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn136_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general15["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general16 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 140}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general16['ssid_modes'].keys(): + for i in range(len(setup_params_general16['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general16['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general16], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSixteen(object): + """ Client Connect SuiteSixteen """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn140_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general16["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general17 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 144}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 20, + "channel": 12} + }, + "radius": False +} + +for sec_modes in setup_params_general17['ssid_modes'].keys(): + for i in range(len(setup_params_general17['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general17['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general17], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSeventeen(object): + """ Client Connect SuiteSeventeen """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7656", name="WIFI-7656") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.twentyMhz + def test_ClientConnect_bridge_wpa2_chn144_20Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general17["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_40mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_40mhz.py new file mode 100644 index 00000000000..8230b176b1b --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_40mhz.py @@ -0,0 +1,1166 @@ +from logging import exception +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException +import random +import string +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_US, pytest.mark.interop_country_code, + pytest.mark.bridge] + + +from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ + Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ + verifyUploadDownloadSpeediOS, get_ip_address_ios + + +setup_params_general1 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 36}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 1} + }, + "radius": False +} + +for sec_modes in setup_params_general1['ssid_modes'].keys(): + for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteOne(object): + """ Client Connect SuiteOne """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn36_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn1_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general2 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 44}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 2} + }, + "radius": False +} + +for sec_modes in setup_params_general2['ssid_modes'].keys(): + for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTwo(object): + """ Client Connect SuiteTwo """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn44_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn2_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general3 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 52}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 3} + }, + "radius": False +} + +for sec_modes in setup_params_general3['ssid_modes'].keys(): + for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteThree(object): + """ Client Connect SuiteThree """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn52_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn3_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general4 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 60}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 4} + }, + "radius": False +} + +for sec_modes in setup_params_general4['ssid_modes'].keys(): + for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFour(object): + """ Client Connect SuiteFour """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn60_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn4_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general5 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 5} + }, + "radius": False +} + +for sec_modes in setup_params_general5['ssid_modes'].keys(): + for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFive(object): + """ Client Connect SuiteFuve """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn100_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn5_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general6 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 6} + }, + "radius": False +} + +for sec_modes in setup_params_general6['ssid_modes'].keys(): + for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSix(object): + """ Client Connect SuiteSix """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn108_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn6_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general7 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 132}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 7} + }, + "radius": False +} + +for sec_modes in setup_params_general7['ssid_modes'].keys(): + for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSeven(object): + """ Client Connect SuiteSeven """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn132_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn7_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general8 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 140}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 8} + }, + "radius": False +} + +for sec_modes in setup_params_general8['ssid_modes'].keys(): + for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEight(object): + """ Client Connect SuiteEight """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7661", name="WIFI-7661") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn140_40Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn8_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general9 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 9} + }, + "radius": False +} + +for sec_modes in setup_params_general9['ssid_modes'].keys(): + for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteNine(object): + """ Client Connect SuiteNine """ + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn9_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general10 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 104}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 10} + }, + "radius": False +} + +for sec_modes in setup_params_general10['ssid_modes'].keys(): + for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTen(object): + """ Client Connect SuiteTen """ + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.fourtyMhz + def test_ClientConnect_bridge_wpa2_chn10_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general11 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 40, + "channel": 11} + }, + "radius": False +} + +for sec_modes in setup_params_general11['ssid_modes'].keys(): + for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEleven(object): + """ Client Connect SuiteEleven """ + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7642", name="WIFI-7642") + @pytest.mark.twog + @pytest.mark.wpa2_personal + def test_ClientConnect_bridge_wpa2_chn11_40Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_80mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_80mhz.py new file mode 100644 index 00000000000..c19d39c58de --- /dev/null +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_US/iOS/test_US_80mhz.py @@ -0,0 +1,1028 @@ +from logging import exception +import unittest +import warnings +from perfecto.test import TestResultFactory +import pytest +import sys +import time +from selenium.common.exceptions import NoSuchElementException +from selenium.webdriver.common.by import By +from appium import webdriver +from selenium.common.exceptions import NoSuchElementException +import random +import string +import sys +import allure + +if 'perfecto_libs' not in sys.path: + sys.path.append(f'../libs/perfecto_libs') + +pytestmark = [pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.interop_country_code_US, pytest.mark.interop_country_code, + pytest.mark.bridge] + + +from iOS_lib import closeApp, openApp, get_WifiIPAddress_iOS, ForgetWifiConnection, ping_deftapps_iOS, \ + Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ + verifyUploadDownloadSpeediOS, get_ip_address_ios + + +setup_params_general1 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 36}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 1} + }, + "radius": False +} + +for sec_modes in setup_params_general1['ssid_modes'].keys(): + for i in range(len(setup_params_general1['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general1['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general1], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteOne(object): + """ Client Connect SuiteOne """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7666", name="WIFI-7666") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn36_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn1_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general2 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 52}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 2} + }, + "radius": False +} + +for sec_modes in setup_params_general2['ssid_modes'].keys(): + for i in range(len(setup_params_general2['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general2['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general2], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTwo(object): + """ Client Connect SuiteTwo """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7666", name="WIFI-7666") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn52_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn2_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general2["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general3 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 3} + }, + "radius": False +} + +for sec_modes in setup_params_general3['ssid_modes'].keys(): + for i in range(len(setup_params_general3['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general3['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general3], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteThree(object): + """ Client Connect SuiteThree """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7666", name="WIFI-7666") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn100_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn3_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general3["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general4 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 132}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 4} + }, + "radius": False +} + +for sec_modes in setup_params_general4['ssid_modes'].keys(): + for i in range(len(setup_params_general4['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general4['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general4], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFour(object): + """ Client Connect SuiteFour """ + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7666", name="WIFI-7666") + @pytest.mark.fiveg + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn132_80Mhz_US_5g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][1] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn4_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general4["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general5 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 52}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 5} + }, + "radius": False +} + +for sec_modes in setup_params_general5['ssid_modes'].keys(): + for i in range(len(setup_params_general5['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general5['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general5], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteFive(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn5_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general5["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general6 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 56}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 6} + }, + "radius": False +} + +for sec_modes in setup_params_general6['ssid_modes'].keys(): + for i in range(len(setup_params_general6['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general6['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general6], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSix(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn6_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general6["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general7 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 60}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 7} + }, + "radius": False +} + +for sec_modes in setup_params_general7['ssid_modes'].keys(): + for i in range(len(setup_params_general7['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general7['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general7], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteSeven(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn7_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general7["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general8 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 64}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 8} + }, + "radius": False +} + +for sec_modes in setup_params_general8['ssid_modes'].keys(): + for i in range(len(setup_params_general8['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general8['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general8], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEight(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn8_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general8["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general9 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 100}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 9} + }, + "radius": False +} + +for sec_modes in setup_params_general9['ssid_modes'].keys(): + for i in range(len(setup_params_general9['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general9['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general9], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteNine(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn9_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general9["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + +setup_params_general10 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 104}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 10} + }, + "radius": False +} + +for sec_modes in setup_params_general10['ssid_modes'].keys(): + for i in range(len(setup_params_general10['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general10['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general10], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteTen(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn10_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general10["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + +setup_params_general11 = { + "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": + {'band': '5G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 108}, + "2G": + {'band': '2G', + 'country': 'US', + "channel-mode": "VHT", + 'channel-width': 80, + "channel": 11} + }, + "radius": False +} + +for sec_modes in setup_params_general11['ssid_modes'].keys(): + for i in range(len(setup_params_general11['ssid_modes'][sec_modes])): + N = 3 + rand_string = (''.join(random.choices(string.ascii_uppercase + + string.digits, k=N)))+str(int(time.time_ns())%10000) + setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] = setup_params_general11['ssid_modes'][sec_modes][i]['ssid_name'] + "_"+ rand_string + + +@allure.suite(suite_name="interop country code") +@allure.sub_suite(sub_suite_name="Bridge Mode country code(US)") +@allure.feature("BRIDGE MODE CLIENT CONNECT WITH COUNTRY CODE US") +@pytest.mark.parametrize( + 'setup_profiles', + [setup_params_general11], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_profiles") +class TestBridgeModeConnectSuiteEleven(object): + + + @allure.testcase(url="https://telecominfraproject.atlassian.net/browse/WIFI-7643", name="WIFI-7643") + @pytest.mark.twog + @pytest.mark.wpa2_personal + @pytest.mark.eightyMhz + def test_ClientConnect_bridge_wpa2_chn11_80Mhz_US_2g(self, request, get_vif_state, get_ap_logs, + get_ToggleAirplaneMode_data, setup_perfectoMobile_iOS): + profile_data = setup_params_general11["ssid_modes"]["wpa2_personal"][0] + ssidName = profile_data["ssid_name"] + ssidPassword = profile_data["security_key"] + print("SSID_NAME: " + ssidName) + print("SSID_PASS: " + ssidPassword) + get_vif_state.append(ssidName) + if ssidName 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") + + report = setup_perfectoMobile_iOS[1] + driver = setup_perfectoMobile_iOS[0] + connData = get_ToggleAirplaneMode_data + + # Set Wifi/AP Mode + ip, is_internet = get_ip_address_ios(request, ssidName, ssidPassword, setup_perfectoMobile_iOS, connData) + + if ip: + if is_internet: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "with internet") + else: + text_body = ("connected to " + ssidName + " (" + ip + ") " + "without internet") + print(text_body) + allure.attach(name="Connection Status: ", body=str(text_body)) + assert True + else: + allure.attach(name="Connection Status: ", body=str("Device is Unable to connect")) + assert False + + From f82b8715ecf8f650cb6902036e87c9984c8cb5a2 Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Fri, 13 May 2022 11:27:31 +0530 Subject: [PATCH 10/14] Added a new marker in rate_limiting testcases(android) Signed-off-by: Jyothsna-setti --- tests/e2e/interOp/Maverick/__init__.py | 0 tests/e2e/interOp/Maverick/android/__init__.py | 0 tests/e2e/interOp/Maverick/android/test_mav.py | 0 tests/e2e/interOp/Maverick/android/test_maverick.py | 0 .../android/test_ToggleAirplaneMode_BridgeMode.py | 2 +- .../toggle_airplane_mode_test/android/test_enterprise_ttls.py | 2 +- .../android/test_general_security_modes.py | 2 +- 7 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 tests/e2e/interOp/Maverick/__init__.py create mode 100644 tests/e2e/interOp/Maverick/android/__init__.py create mode 100644 tests/e2e/interOp/Maverick/android/test_mav.py create mode 100644 tests/e2e/interOp/Maverick/android/test_maverick.py diff --git a/tests/e2e/interOp/Maverick/__init__.py b/tests/e2e/interOp/Maverick/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/e2e/interOp/Maverick/android/__init__.py b/tests/e2e/interOp/Maverick/android/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/e2e/interOp/Maverick/android/test_mav.py b/tests/e2e/interOp/Maverick/android/test_mav.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/e2e/interOp/Maverick/android/test_maverick.py b/tests/e2e/interOp/Maverick/android/test_maverick.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_ToggleAirplaneMode_BridgeMode.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_ToggleAirplaneMode_BridgeMode.py index e771055306d..2ac2b45bb28 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_ToggleAirplaneMode_BridgeMode.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_ToggleAirplaneMode_BridgeMode.py @@ -16,7 +16,7 @@ if 'perfecto_libs' not in sys.path: sys.path.append(f'../libs/perfecto_libs') -pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode] +pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, pytest.mark.bridge,pytest.mark.client_reconnect, pytest.mark.client_reconnect_testing] from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py index cf7904e3a74..2ae5cc29417 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py @@ -18,7 +18,7 @@ sys.path.append(f'../libs/perfecto_libs') pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, - pytest.mark.client_reconnect, pytest.mark.enterprise] + pytest.mark.client_reconnect, pytest.mark.enterprise, pytest.mark.client_reconnect_testing] from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp,\ gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_eap_and_does_not_forget_ssid diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_general_security_modes.py index a4516acf865..eb0338562d5 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_general_security_modes.py @@ -17,7 +17,7 @@ if 'perfecto_libs' not in sys.path: sys.path.append(f'../libs/perfecto_libs') -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, pytest.mark.client_reconnect] +pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, pytest.mark.client_reconnect, pytest.mark.client_reconnect_testing] from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp,\ gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_and_does_not_forget_ssid From e2d6dcff89c5251382ee0faa0c0bc8f26ade50ce Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Fri, 13 May 2022 11:58:49 +0530 Subject: [PATCH 11/14] Added new marker in rate_limiting (android) Signed-off-by: Jyothsna-setti --- .../iOS/test_ToggleAirplaneMode_BridgeMode.py | 2 +- .../toggle_airplane_mode_test/iOS/test_enterprise_ttls.py | 2 +- .../iOS/test_general_securtiy_modes.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_ToggleAirplaneMode_BridgeMode.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_ToggleAirplaneMode_BridgeMode.py index 46010ea7478..a3d129a7a50 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_ToggleAirplaneMode_BridgeMode.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_ToggleAirplaneMode_BridgeMode.py @@ -20,7 +20,7 @@ verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.ToggleAirplaneMode] + pytest.mark.ToggleAirplaneMode, pytest.mark.client_reconnect, pytest.mark.client_reconnect_testing] setup_params_general = { "mode": "BRIDGE", diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py index fef70e28ddc..05b5de0943c 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_enterprise_ttls.py @@ -23,7 +23,7 @@ verifyUploadDownloadSpeediOS, gets_ip_add_eap_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect_eap, wifi_disconnect_and_forget pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_reconnect - , pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ToggleAirplaneMode] + , pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ToggleAirplaneMode, pytest.mark.client_reconnect_testing] setup_params_enterprise = { "mode": "BRIDGE", diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_general_securtiy_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_general_securtiy_modes.py index 164192c5baf..0fb7d1dc4e0 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_general_securtiy_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_general_securtiy_modes.py @@ -23,7 +23,7 @@ verifyUploadDownloadSpeediOS, gets_ip_add_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect, wifi_disconnect_and_forget pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_reconnect, pytest.mark.bridge, pytest.mark.ToggleAirplaneMode] + pytest.mark.client_reconnect, pytest.mark.bridge, pytest.mark.ToggleAirplaneMode, pytest.mark.client_reconnect_testing] setup_params_general = { "mode": "BRIDGE", From 9bb047f852b8556a62d5a82049147acb1e31e53f Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Fri, 13 May 2022 12:07:46 +0530 Subject: [PATCH 12/14] Added a new marker in Toggle-wifimode testcases(both android and ios) Signed-off-by: Jyothsna-setti --- .../toggle_wifi_mode_test/android/test_WifiMode_BridgeMode.py | 2 +- .../toggle_wifi_mode_test/android/test_enterprise_ttls.py | 2 +- .../android/test_general_security_modes.py | 2 +- .../toggle_wifi_mode_test/iOS/test_ToggleWifiMode_Bridge.py | 2 +- .../toggle_wifi_mode_test/iOS/test_enterprise_ttls.py | 2 +- .../toggle_wifi_mode_test/iOS/test_general_security_modes.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_WifiMode_BridgeMode.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_WifiMode_BridgeMode.py index bc83f39a969..41115ea7d6c 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_WifiMode_BridgeMode.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_WifiMode_BridgeMode.py @@ -17,7 +17,7 @@ sys.path.append(f'../libs/perfecto_libs') pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.interop_and, pytest.mark.android, - pytest.mark.ToggleWifiMode] + pytest.mark.ToggleWifiMode,pytest.mark.client_reconnect, pytest.mark.client_reconnect_testing] from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, Toggle_AirplaneMode_android, \ ForgetWifiConnection, openApp diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py index 15f08f79fe4..6dcc38169ce 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_enterprise_ttls.py @@ -18,7 +18,7 @@ sys.path.append(f'../libs/perfecto_libs') pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleWifiMode, - pytest.mark.client_reconnect, pytest.mark.enterprise] + pytest.mark.client_reconnect, pytest.mark.enterprise, pytest.mark.client_reconnect_testing] from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, ForgetWifiConnection, openApp,\ gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_eap_and_does_not_forget_ssid diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_general_security_modes.py index 4a9d5ea27ea..3e272d8451f 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_general_security_modes.py @@ -17,7 +17,7 @@ if 'perfecto_libs' not in sys.path: sys.path.append(f'../libs/perfecto_libs') -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleWifiMode, pytest.mark.client_reconnect] +pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleWifiMode, pytest.mark.client_reconnect, pytest.mark.client_reconnect_testing] from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, ForgetWifiConnection, openApp,\ gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_and_does_not_forget_ssid diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_ToggleWifiMode_Bridge.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_ToggleWifiMode_Bridge.py index bbb42157958..7e161a7faa0 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_ToggleWifiMode_Bridge.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_ToggleWifiMode_Bridge.py @@ -17,7 +17,7 @@ sys.path.append(f'../libs/perfecto_libs') pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.ToggleWifiMode] + pytest.mark.ToggleWifiMode, pytest.mark.client_reconnect_testing, pytest.mark.client_reconnect] from iOS_lib import closeApp, openApp, Toggle_AirplaneMode_iOS, ForgetWifiConnection, set_APconnMobileDevice_iOS, \ verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py index f97886b4e16..8c4000e5261 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_enterprise_ttls.py @@ -23,7 +23,7 @@ verifyUploadDownloadSpeediOS, gets_ip_add_eap_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect_eap, wifi_disconnect_and_forget pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, pytest.mark.client_reconnect - , pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ToggleWifiMode] + , pytest.mark.bridge, pytest.mark.enterprise, pytest.mark.ToggleWifiMode, pytest.mark.client_reconnect_testing] setup_params_enterprise = { "mode": "BRIDGE", diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py index cb20df9d4d6..5f27354afa3 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py @@ -23,7 +23,7 @@ verifyUploadDownloadSpeediOS, gets_ip_add_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect, wifi_disconnect_and_forget pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, - pytest.mark.client_reconnect, pytest.mark.bridge, pytest.mark.ToggleWifiMode] + pytest.mark.client_reconnect, pytest.mark.bridge, pytest.mark.ToggleWifiMode, pytest.mark.client_reconnect_testing] setup_params_general = { "mode": "BRIDGE", From f233fff1667b273e3a3c7bc8ad5dfc3898395f67 Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Sun, 15 May 2022 07:05:24 +0530 Subject: [PATCH 13/14] Added a new marker in ToggleAirplaneMode and ToggleWifiMode Signed-off-by: Jyothsna-setti --- tests/e2e/Maverick/Android/__init__.py | 0 tests/e2e/Maverick/Android/test_maverick.py | 0 tests/e2e/Maverick/__init__.py | 0 .../android/test_general_security_modes.py | 2 +- .../iOS/test_general_securtiy_modes.py | 2 +- .../android/test_general_security_modes.py | 2 +- .../toggle_wifi_mode_test/iOS/test_general_security_modes.py | 2 +- 7 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 tests/e2e/Maverick/Android/__init__.py create mode 100644 tests/e2e/Maverick/Android/test_maverick.py create mode 100644 tests/e2e/Maverick/__init__.py diff --git a/tests/e2e/Maverick/Android/__init__.py b/tests/e2e/Maverick/Android/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/e2e/Maverick/Android/test_maverick.py b/tests/e2e/Maverick/Android/test_maverick.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/e2e/Maverick/__init__.py b/tests/e2e/Maverick/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_general_security_modes.py index eb0338562d5..20ee4fd9ea1 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_general_security_modes.py @@ -17,7 +17,7 @@ if 'perfecto_libs' not in sys.path: sys.path.append(f'../libs/perfecto_libs') -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, pytest.mark.client_reconnect, pytest.mark.client_reconnect_testing] +pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, pytest.mark.client_reconnect,pytest.mark.general_security, pytest.mark.client_reconnect_testing] from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp,\ gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_and_does_not_forget_ssid diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_general_securtiy_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_general_securtiy_modes.py index 0fb7d1dc4e0..1b62c33d0b9 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_general_securtiy_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/iOS/test_general_securtiy_modes.py @@ -22,7 +22,7 @@ Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ verifyUploadDownloadSpeediOS, gets_ip_add_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect, wifi_disconnect_and_forget -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, +pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios,pytest.mark.general_security, pytest.mark.interop_ios, pytest.mark.client_reconnect, pytest.mark.bridge, pytest.mark.ToggleAirplaneMode, pytest.mark.client_reconnect_testing] setup_params_general = { diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_general_security_modes.py index 3e272d8451f..f57962720ff 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/android/test_general_security_modes.py @@ -17,7 +17,7 @@ if 'perfecto_libs' not in sys.path: sys.path.append(f'../libs/perfecto_libs') -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleWifiMode, pytest.mark.client_reconnect, pytest.mark.client_reconnect_testing] +pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleWifiMode, pytest.mark.client_reconnect,pytest.mark.general_security, pytest.mark.client_reconnect_testing] from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_WifiMode_android, ForgetWifiConnection, openApp,\ gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_and_does_not_forget_ssid diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py index 5f27354afa3..dcde4150d0f 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_wifi_mode_test/iOS/test_general_security_modes.py @@ -22,7 +22,7 @@ Toggle_AirplaneMode_iOS, set_APconnMobileDevice_iOS, verify_APconnMobileDevice_iOS, Toggle_WifiMode_iOS, tearDown,\ verifyUploadDownloadSpeediOS, gets_ip_add_and_does_not_forget_ssid_ios, gets_ip_add_for_checking_and_forgets_ssid_ios, wifi_connect, wifi_disconnect_and_forget -pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios, pytest.mark.interop_ios, +pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.ios,pytest.mark.general_security, pytest.mark.interop_ios, pytest.mark.client_reconnect, pytest.mark.bridge, pytest.mark.ToggleWifiMode, pytest.mark.client_reconnect_testing] setup_params_general = { From b1effc890bdad5f0a8adfcc5179c4872766cebde Mon Sep 17 00:00:00 2001 From: Jyothsna-setti Date: Tue, 17 May 2022 19:57:05 +0530 Subject: [PATCH 14/14] Added new markers Signed-off-by: Jyothsna-setti --- .../bridge_mode/client_connect_test/android/test_BridgeMode.py | 3 +-- .../country_code_CA/android/test_CA_20Mhz.py | 1 + .../toggle_airplane_mode_test/android/test_enterprise_ttls.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_BridgeMode.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_BridgeMode.py index 938af2c720d..a3bd05da6ce 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_BridgeMode.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/client_connect_test/android/test_BridgeMode.py @@ -19,8 +19,7 @@ pytestmark = [pytest.mark.sanity, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ClientConnectivity] -from android_lib import closeApp, set_APconnMobileDevice_android, verifyUploadDownloadSpeed_android, \ - Toggle_AirplaneMode_android, ForgetWifiConnection, openApp +from android_lib import closeApp, set_APconnMobileDevice_android, verifyUploadDownloadSpeed_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp setup_params_general = { "mode": "BRIDGE", diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_20Mhz.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_20Mhz.py index 40329eeed45..071cf412399 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_20Mhz.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/country_code_channel_division/country_code_CA/android/test_CA_20Mhz.py @@ -67,6 +67,7 @@ class TestBridgeModeConnectSuiteOne(object): @pytest.mark.fiveg @pytest.mark.wpa2_personal @pytest.mark.twentyMhz + @pytest.mark.patience def test_ClientConnect_bridge_wpa2_chn36_20Mhz_CA_5g(self, request, get_vif_state, get_ap_logs, get_ToggleAirplaneMode_data, setup_perfectoMobile_android): profile_data = setup_params_general1["ssid_modes"]["wpa2_personal"][1] diff --git a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py index 2ae5cc29417..cf7904e3a74 100644 --- a/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py +++ b/tests/e2e/interOp/validation_of_operating_modes/bridge_mode/toggle_airplane_mode_test/android/test_enterprise_ttls.py @@ -18,7 +18,7 @@ sys.path.append(f'../libs/perfecto_libs') pytestmark = [pytest.mark.regression, pytest.mark.interop, pytest.mark.android, pytest.mark.interop_and, pytest.mark.ToggleAirplaneMode, - pytest.mark.client_reconnect, pytest.mark.enterprise, pytest.mark.client_reconnect_testing] + pytest.mark.client_reconnect, pytest.mark.enterprise] from android_lib import closeApp, set_APconnMobileDevice_android, Toggle_AirplaneMode_android, ForgetWifiConnection, openApp,\ gets_ip_add_for_checking_and_forgets_ssid, verifyUploadDownloadSpeed_android, wifi_connect, wifi_disconnect_and_forget, gets_ip_add_eap_and_does_not_forget_ssid