Beispiel #1
0
 def check_slave_ap_group1_portal_function(self, NG2_ssid, password, wlan,
                                           eth):
     #7000新建一个网络组,vid设为2,开启dhcp server
     tmp1 = NGBusiness(self.driver)
     tmp1.mixed_7000_new_NG()
     #76xx上新建一个网络组,vid为2
     self.driver.get(data_basic['DUT_web'])
     self.driver.implicitly_wait(60)
     self.driver.refresh()
     time.sleep(10)
     tmp2 = SSIDBusiness(self.driver)
     tmp2.new_vlan_ssid(NG2_ssid, password, "2")
     #开启group1的强制门户认证
     tmp2.click_ssid_portal(2)
     #slave ap加入所有的网络组
     tmp3 = APSBusiness(self.driver)
     tmp3.add_slave_to_all_NG()
     #使用免认证的规则,访问腾讯首页,判断是否跳转到portal页面
     result = CPBusiness.check_jump_to_No_auth_portal(
         self, NG2_ssid, password, wlan, eth)
     #刷新页面重新登录ap页面
     Lg = LoginBusiness(self.driver)
     Lg.refresh_login_ap()
     #删除ssid1
     tmp2.del_all_NG()
     #删除7000新建的网络组
     tmp1.mixed_7000_del_NG()
     print result
     return result
Beispiel #2
0
 def check_group1_radius_portal_function(self, NG2_ssid, password, wlan,
                                         eth, t, radius_name,
                                         radius_password):
     #7000新建一个网络组,vid设为2,开启dhcp server
     tmp1 = NGBusiness(self.driver)
     tmp1.mixed_7000_new_NG()
     #76xx上新建一个网络组,vid为2
     self.driver.get(data_basic['DUT_web'])
     self.driver.implicitly_wait(60)
     self.driver.refresh()
     time.sleep(10)
     tmp3 = SSIDBusiness(self.driver)
     tmp3.new_vlan_ssid(NG2_ssid, password, "2")
     #开启ssid1的强制门户认证
     tmp3.click_ssid_portal(2)
     #master ap加入所有的网络组
     tmp2 = APSBusiness(self.driver)
     tmp2.add_master_to_all_NG()
     #验证默认list:grandstream中的radius认证的有效性
     portal_title,redirect_title,again_title,expiration_title = \
         CPBusiness.check_radius_portal(self,NG2_ssid,password,
         wlan,eth,t,radius_name,radius_password)
     #刷新页面重新登录ap页面
     Lg = LoginBusiness(self.driver)
     Lg.refresh_login_ap()
     #删除master ap的ssid1
     tmp3.del_all_NG()
     #删除7000新建的网络组
     tmp1.mixed_7000_del_NG()
     return portal_title, redirect_title, again_title, expiration_title
Beispiel #3
0
 def check_open_close_many_groups_captive_portal_function(
         self, group0_ssid, group1_ssid, group2_ssid, password, wlan, eth):
     result = []
     tmp1 = SSIDBusiness(self.driver)
     for i in range(2):
         #点击group0的强制门户认证
         #点击三个网络组的强制门户认证
         tmp1.click_many_group_portal(3)
         #使用免认证的规则,访问腾讯首页,判断是否跳转到portal页面
         for j in [group0_ssid, group1_ssid, group2_ssid]:
             result1 = CPBusiness.check_jump_to_No_auth_portal(
                 self, j, password, wlan, eth)
             result.append(result1)
         #测试完成一遍后,再次登录ap页面,为后续循环测试做好准备
         #刷新页面重新登录ap页面
         Lg = LoginBusiness(self.driver)
         Lg.refresh_login_ap()
         time.sleep(30)
     #删除master ap的两个ssid
     tmp1 = SSIDBusiness(self.driver)
     tmp1.del_all_NG()
     #删除7000新建的两个网络组
     tmp2 = NGBusiness(self.driver)
     tmp2.mixed_7000_del_NG()
     print result
     return result
 def test_012_disconnect_clients_info(self):
     u"""无线网卡断开ap后,查看客户端信息(testlink_ID:501)"""
     log.debug("012")
     tmp = ClientsBusiness(self.driver)
     #无线网卡断开已连接的AP
     tmp.wlan_disable(data_basic['wlan_pc'])
     #获取客户端的mac地址
     result1 = tmp.check_client(data_basic['wlan_pc'])
     wlan_mac = tmp.get_wlan_mac(data_basic['wlan_pc'])
     result2 = tmp.get_offline_status(wlan_mac)
     print result1, result2
     #删除SSID1
     tmp1 = SSIDBusiness(self.driver)
     tmp1.del_all_NG()
     #使用无线网卡能够连接上ssid,并正常使用
     tmp.wlan_enable(data_basic['wlan_pc'])
     tmp.connect_WPA_AP(data_wireless['all_ssid'],
                        data_wireless['short_wpa'], data_basic['wlan_pc'])
     assert result1 and (
         (u"离线" or 'Offline')
         in result2), "test after disconnecting ap,test fail!"
     print "test after disconnecting ap,test pass!"
Beispiel #5
0
 def test_052_master_cameback_can_update_configuration(self):
     u"""当master ap回来后,确认能够修改配置(testlink_ID:2406)"""
     log.debug("052")
     tmp1 = SSIDBusiness(self.driver)
     #删除所有的网络组
     tmp1.del_all_NG()
     #修改group0的ssid
     ssid = data_wireless['all_ssid']+"-9"
     tmp1.change_wifi_ssid_key(ssid,data_wireless['short_wpa'])
     #检查ssid是否修改成功
     result1 = tmp1.check_NG_ssid(data_basic["DUT_ip"],
         data_basic["sshUser"], data_login['all'])
     result2 = tmp1.check_NG_ssid(data_basic["slave_ip1"],
         data_basic["sshUser"], data_login['all'])
     result3 = tmp1.check_NG_ssid(data_basic["slave_ip2"],
         data_basic["sshUser"], data_login['all'])
     time.sleep(60)
     #解除slave1,slave2的配对
     tmp = APSBusiness(self.driver)
     tmp.unpair_last_slave_ap(2)
     self.assertIn(ssid, result1)
     self.assertIn(ssid, result2)
     self.assertIn(ssid, result3), "when master ap came back,check can update configuration,test fail!"
     print "when master ap came back,check can update configuration,test pass!"