1#!/usr/bin/env python3.4 2# 3# Copyright 2021 - The Android Open Source Project 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16 17from acts.test_decorators import test_tracker_info 18from WifiNewSetupAutoJoinTest import WifiNewSetupAutoJoinTest 19 20class WifiNewSetupWifiToWifiAutoJoinTest(WifiNewSetupAutoJoinTest): 21 """Test Wifi to Wifi auto-switching. 22 23 Note that tests are inherited from WifiNewSetupAutoJoinTest. The only 24 modification is in setup_test, where we ensure Wifi is connected before 25 switching networks 26 """ 27 28 def __init__(self, configs): 29 super().__init__(configs) 30 # Since this test class is inherited, the test cases from the inherited 31 # class are also run. Adding the self.tests that are specific to only 32 # this class. 33 self.tests = ( 34 "test_wifi_to_wifi_autojoin_Ap1_2g_AP1_20_AP2_95_AP3_95", 35 "test_wifi_to_wifi_autojoin_Ap1_2g_AP1_15_AP2_95_AP3_95", 36 "test_wifi_to_wifi_autojoin_Ap1_2g_AP1_10_AP2_95_AP3_95", 37 "test_wifi_to_wifi_autojoin_Ap1_2g_AP1_5_AP2_95_AP3_95", 38 "test_wifi_to_wifi_autojoin_Ap1_2gto5g_AP1_55_AP2_10_AP3_95", 39 "test_wifi_to_wifi_autojoin_Ap1_2gto5g_AP1_50_AP2_10_AP3_95", 40 "test_wifi_to_wifi_autojoin_Ap1_2gto5g_AP1_45_AP2_10_AP3_95", 41 "test_wifi_to_wifi_autojoin_in_AP1_5gto2g_AP1_5_AP2_80_AP3_95", 42 "test_wifi_to_wifi_autojoin_in_AP1_5gto2g_AP1_10_AP2_75_AP3_95", 43 "test_wifi_to_wifi_autojoin_in_AP1_5gto2g_AP1_15_AP2_70_AP3_95", 44 "test_wifi_to_wifi_autojoin_switch_AP1toAp2_AP1_65_AP2_75_AP3_2", 45 "test_wifi_to_wifi_autojoin_switch_AP1toAp2_AP1_70_AP2_70_AP3_2", 46 "test_wifi_to_wifi_autojoin_switch_AP1toAp2_AP1_75_AP2_65_AP3_2", 47 "test_wifi_to_wifi_autojoin_Ap2_2gto5g_AP1_70_AP2_85_AP3_75", 48 "test_wifi_to_wifi_autojoin_Ap2_2gto5g_AP1_75_AP2_80_AP3_75", 49 "test_wifi_to_wifi_autojoin_Ap2_2gto5g_AP1_75_AP2_75_AP3_75", 50 "test_wifi_to_wifi_autojoin_Ap2_5gto2g_AP1_75_AP2_70_AP3_10", 51 "test_wifi_to_wifi_autojoin_Ap2_5gto2g_AP1_75_AP2_75_AP3_10", 52 "test_wifi_to_wifi_autojoin_Ap2_5gto2g_AP1_75_AP2_80_AP3_10", 53 "test_wifi_to_wifi_autojoin_out_of_range", 54 "test_wifi_to_wifi_autojoin_Ap2_2g_AP1_75_AP2_85_AP3_10", 55 "test_wifi_to_wifi_autojoin_Ap2_2g_AP1_75_AP2_80_AP3_10", 56 "test_wifi_to_wifi_autojoin_Ap2_2g_AP1_75_AP2_75_AP3_10", 57 "test_wifi_to_wifi_autojoin_Ap2_2g_AP1_75_AP2_70_AP3_10", 58 "test_wifi_to_wifi_autojoin_in_Ap2_5gto2g_AP1_75_AP2_70_AP3_10", 59 "test_wifi_to_wifi_autojoin_in_Ap2_5gto2g_AP1_75_AP2_75_AP3_10", 60 "test_wifi_to_wifi_autojoin_in_Ap2_5gto2g_AP1_75_AP2_80_AP3_10", 61 "test_wifi_to_wifi_autojoin_switch_AP2toAp1_AP1_15_AP2_65_AP3_75", 62 "test_wifi_to_wifi_autojoin_switch_AP2toAp1_AP1_10_AP2_70_AP3_75", 63 "test_wifi_to_wifi_autojoin_switch_AP2toAp1_AP1_5_AP2_75_AP3_75", 64 "test_wifi_to_wifi_autojoin_Ap1_5gto2g_AP1_10_AP2_80_AP3_95", 65 "test_wifi_to_wifi_autojoin_Ap1_5gto2g_AP1_15_AP2_80_AP3_95", 66 "test_wifi_to_wifi_autojoin_Ap1_5gto2g_AP1_20_AP2_80_AP3_95", 67 ) 68 69 def setup_test(self): 70 super().setup_test() 71 # Attenuate all other networks except network 0's 2.4 GHz STA, and 72 # validate we connect to it. 73 # This ensures that we are connected to something at the beginning of 74 # each test, in order to test Wifi-to-Wifi switching. 75 self.set_attn_and_validate_connection( 76 (0, 90, 90, 90), 77 self.reference_networks[0]["2g"]['bssid']) 78 79 """ Tests Begin """ 80 81 @test_tracker_info(uuid="205dbf01-cb2a-41b7-8945-4b1d0c4fb443") 82 def test_wifi_to_wifi_autojoin_Ap1_2g_AP1_20_AP2_95_AP3_95(self): 83 super().test_autojoin_Ap1_2g_AP1_20_AP2_95_AP3_95() 84 85 @test_tracker_info(uuid="90d944a0-70fc-4ab0-a786-0ac8e967dbf6") 86 def test_wifi_to_wifi_autojoin_Ap1_2g_AP1_15_AP2_95_AP3_95(self): 87 super().test_autojoin_Ap1_2g_AP1_15_AP2_95_AP3_95() 88 89 @test_tracker_info(uuid="cab7d874-83e0-444a-b538-b6f959a25091") 90 def test_wifi_to_wifi_autojoin_Ap1_2g_AP1_10_AP2_95_AP3_95(self): 91 super().test_autojoin_Ap1_2g_AP1_10_AP2_95_AP3_95() 92 93 @test_tracker_info(uuid="b7914791-e801-49b7-a533-7b3a992253c6") 94 def test_wifi_to_wifi_autojoin_Ap1_2g_AP1_5_AP2_95_AP3_95(self): 95 super().test_autojoin_Ap1_2g_AP1_5_AP2_95_AP3_95() 96 97 @test_tracker_info(uuid="82af1667-0859-4074-9006-70b0a7896f1d") 98 def test_wifi_to_wifi_autojoin_Ap1_2gto5g_AP1_55_AP2_10_AP3_95(self): 99 super().test_autojoin_Ap1_2gto5g_AP1_55_AP2_10_AP3_95() 100 101 @test_tracker_info(uuid="a8dae171-f98f-46ea-837e-86614719f1ea") 102 def test_wifi_to_wifi_autojoin_Ap1_2gto5g_AP1_50_AP2_10_AP3_95(self): 103 super().test_autojoin_Ap1_2gto5g_AP1_50_AP2_10_AP3_95() 104 105 @test_tracker_info(uuid="f70d6d59-430f-45cf-928f-bbc0609fe07e") 106 def test_wifi_to_wifi_autojoin_Ap1_2gto5g_AP1_45_AP2_10_AP3_95(self): 107 super().test_autojoin_Ap1_2gto5g_AP1_45_AP2_10_AP3_95() 108 109 @test_tracker_info(uuid="16cedd3a-84e4-4b85-87c5-7658b8b8e5fb") 110 def test_wifi_to_wifi_autojoin_in_AP1_5gto2g_AP1_5_AP2_80_AP3_95(self): 111 super().test_autojoin_in_AP1_5gto2g_AP1_5_AP2_80_AP3_95() 112 113 @test_tracker_info(uuid="5a2461c8-fa2b-418b-a6d2-9ed980a1932e") 114 def test_wifi_to_wifi_autojoin_in_AP1_5gto2g_AP1_10_AP2_75_AP3_95(self): 115 super().test_autojoin_in_AP1_5gto2g_AP1_10_AP2_75_AP3_95() 116 117 @test_tracker_info(uuid="340d7d02-30e6-4ed9-a28c-0b2a1050c91c") 118 def test_wifi_to_wifi_autojoin_in_AP1_5gto2g_AP1_15_AP2_70_AP3_95(self): 119 super().test_autojoin_in_AP1_5gto2g_AP1_15_AP2_70_AP3_95() 120 121 @test_tracker_info(uuid="dadf079f-6634-47e7-852a-4aaad3905f57") 122 def test_wifi_to_wifi_autojoin_switch_AP1toAp2_AP1_65_AP2_75_AP3_2(self): 123 super().test_autojoin_swtich_AP1toAp2_AP1_65_AP2_75_AP3_2() 124 125 @test_tracker_info(uuid="29a842a0-427a-41f7-8243-6cce34fac2f7") 126 def test_wifi_to_wifi_autojoin_switch_AP1toAp2_AP1_70_AP2_70_AP3_2(self): 127 super().test_autojoin_swtich_AP1toAp2_AP1_70_AP2_70_AP3_2() 128 129 @test_tracker_info(uuid="881c98cc-ddda-43b6-91af-a50152ae47bb") 130 def test_wifi_to_wifi_autojoin_switch_AP1toAp2_AP1_75_AP2_65_AP3_2(self): 131 super().test_autojoin_swtich_AP1toAp2_AP1_75_AP2_65_AP3_2() 132 133 @test_tracker_info(uuid="a81c2a3b-3fe5-4b8f-9282-4d09718d0e40") 134 def test_wifi_to_wifi_autojoin_Ap2_2gto5g_AP1_70_AP2_85_AP3_75(self): 135 super().test_autojoin_Ap2_2gto5g_AP1_70_AP2_85_AP3_75() 136 137 @test_tracker_info(uuid="ac7605cd-1bcd-488f-ba53-70d9d6a6231a") 138 def test_wifi_to_wifi_autojoin_Ap2_2gto5g_AP1_75_AP2_80_AP3_75(self): 139 super().test_autojoin_Ap2_2gto5g_AP1_75_AP2_80_AP3_75() 140 141 @test_tracker_info(uuid="7757cae4-9cd4-48ba-a6d9-67e70093a76d") 142 def test_wifi_to_wifi_autojoin_Ap2_2gto5g_AP1_75_AP2_75_AP3_75(self): 143 super().test_autojoin_Ap2_2gto5g_AP1_75_AP2_75_AP3_75() 144 145 @test_tracker_info(uuid="51ed8923-9409-403f-8001-4da130903d4e") 146 def test_wifi_to_wifi_autojoin_Ap2_5gto2g_AP1_75_AP2_70_AP3_10(self): 147 super().test_autojoin_Ap2_5gto2g_AP1_75_AP2_70_AP3_10() 148 149 @test_tracker_info(uuid="f818b6e0-a1af-4a8c-bffd-828752d5f5ba") 150 def test_wifi_to_wifi_autojoin_Ap2_5gto2g_AP1_75_AP2_75_AP3_10(self): 151 super().test_autojoin_Ap2_5gto2g_AP1_75_AP2_75_AP3_10() 152 153 @test_tracker_info(uuid="70958be1-bb6b-4cb5-9904-7acb8635ad93") 154 def test_wifi_to_wifi_autojoin_Ap2_5gto2g_AP1_75_AP2_80_AP3_10(self): 155 super().test_autojoin_Ap2_5gto2g_AP1_75_AP2_80_AP3_10() 156 157 @test_tracker_info(uuid="f9e97a28-3dae-485b-af2a-acb8ac170607") 158 def test_wifi_to_wifi_autojoin_out_of_range(self): 159 super().test_autojoin_out_of_range() 160 161 @test_tracker_info(uuid="c0f93393-9311-41ea-a5da-781af5101515") 162 def test_wifi_to_wifi_autojoin_Ap2_2g_AP1_75_AP2_85_AP3_10(self): 163 super().test_autojoin_Ap2_2g_AP1_75_AP2_85_AP3_10() 164 165 @test_tracker_info(uuid="04f23c21-3f3e-4f84-89a1-cd88c616ee7d") 166 def test_wifi_to_wifi_autojoin_Ap2_2g_AP1_75_AP2_80_AP3_10(self): 167 super().test_autojoin_Ap2_2g_AP1_75_AP2_80_AP3_10() 168 169 @test_tracker_info(uuid="9cb970cf-e8f7-4579-9cd4-d1de40aeb231") 170 def test_wifi_to_wifi_autojoin_Ap2_2g_AP1_75_AP2_75_AP3_10(self): 171 super().test_autojoin_Ap2_2g_AP1_75_AP2_75_AP3_10() 172 173 @test_tracker_info(uuid="b1c73364-ff1e-450a-9818-d24958a9d9de") 174 def test_wifi_to_wifi_autojoin_Ap2_2g_AP1_75_AP2_70_AP3_10(self): 175 super().test_autojoin_Ap2_2g_AP1_75_AP2_70_AP3_10() 176 177 @test_tracker_info(uuid="76994fa0-1239-4289-9bce-1ec6841abd0d") 178 def test_wifi_to_wifi_autojoin_in_Ap2_5gto2g_AP1_75_AP2_70_AP3_10(self): 179 super().test_autojoin_in_Ap2_5gto2g_AP1_75_AP2_70_AP3_10() 180 181 @test_tracker_info(uuid="5f459757-9b55-4e49-8549-ed25a8fbbe71") 182 def test_wifi_to_wifi_autojoin_in_Ap2_5gto2g_AP1_75_AP2_75_AP3_10(self): 183 super().test_autojoin_in_Ap2_5gto2g_AP1_75_AP2_75_AP3_10() 184 185 @test_tracker_info(uuid="82f2b16c-622d-44cd-b84c-7c6da63a9b0a") 186 def test_wifi_to_wifi_autojoin_in_Ap2_5gto2g_AP1_75_AP2_80_AP3_10(self): 187 super().test_autojoin_in_Ap2_5gto2g_AP1_75_AP2_80_AP3_10() 188 189 @test_tracker_info(uuid="a6b31b17-5dba-4709-b603-62f324e4da0c") 190 def test_wifi_to_wifi_autojoin_switch_AP2toAp1_AP1_15_AP2_65_AP3_75(self): 191 super().test_autojoin_swtich_AP2toAp1_AP1_15_AP2_65_AP3_75() 192 193 @test_tracker_info(uuid="e69ad2fa-817b-4f57-854b-a2e0cf1ddf20") 194 def test_wifi_to_wifi_autojoin_switch_AP2toAp1_AP1_10_AP2_70_AP3_75(self): 195 super().test_autojoin_swtich_AP2toAp1_AP1_10_AP2_70_AP3_75() 196 197 @test_tracker_info(uuid="c3983109-a8ed-4161-aa8b-dfefe0068991") 198 def test_wifi_to_wifi_autojoin_switch_AP2toAp1_AP1_5_AP2_75_AP3_75(self): 199 super().test_autojoin_swtich_AP2toAp1_AP1_5_AP2_75_AP3_75() 200 201 @test_tracker_info(uuid="6c5ac0b7-a027-44cd-8b03-3a05952bd6f7") 202 def test_wifi_to_wifi_autojoin_Ap1_5gto2g_AP1_10_AP2_80_AP3_95(self): 203 super().test_autojoin_Ap1_5gto2g_AP1_10_AP2_80_AP3_95() 204 205 @test_tracker_info(uuid="87e52e7c-ab86-41a9-b301-987c526141a4") 206 def test_wifi_to_wifi_autojoin_Ap1_5gto2g_AP1_15_AP2_80_AP3_95(self): 207 super().test_autojoin_Ap1_5gto2g_AP1_15_AP2_80_AP3_95() 208 209 @test_tracker_info(uuid="f48f45ad-3bde-4b19-8c0f-5abf5ece5acd") 210 def test_wifi_to_wifi_autojoin_Ap1_5gto2g_AP1_20_AP2_80_AP3_95(self): 211 super().test_autojoin_Ap1_5gto2g_AP1_20_AP2_80_AP3_95() 212 213 """ Tests End """ 214