Exemple #1
0
 def test_023_check_slave_AP(self):
     u"""Slave AP可以显示在Top AP列表中(testlink_ID:1180)---有概率性bug"""
     log.debug("023")
     tmp = OVBusiness(self.driver)
     result = tmp.get_top()
     assert (data_ap['slave:mac2'].upper() in result),"slave ap in TOP AP,test fail!"
     print "slave ap in TOP AP,test pass!"
Exemple #2
0
 def test_024_check_master_AP(self):
     u"""Master AP可以显示在Top AP列表中(testlink_ID:1181)---有概率性bug"""
     log.debug("024")
     tmp = OVBusiness(self.driver)
     result = tmp.get_top()
     assert (data_ap['master:mac'].upper() in result),"master ap in TOP AP,test fail!"
     print "master ap in TOP AP,test pass!"
Exemple #3
0
 def test_027_goto_NG_webpage(self):
     u"""点击TOP SSID右上角的三个小点,页面将跳转到网络组页面(testlink_ID:1201)"""
     log.debug("027")
     tmp = OVBusiness(self.driver)
     result = tmp.goto_NG_webpage()
     assert result,"click goto button can't goto network  group webpage,test fail!"
     print "click goto button can goto network group webpage,test pass!"
Exemple #4
0
 def test_030_goto_TOP_Clients_webpage(self):
     u"""点击TOP clients右上角的三个小点,页面将跳转到客户端页面(testlink_ID:1220)"""
     log.debug("030")
     tmp = OVBusiness(self.driver)
     result = tmp.goto_TOP_Clients_webpage()
     assert result,"click goto button can't goto Clients webpage,test fail!"
     print "click goto button can goto Clients webpage,test pass!"
Exemple #5
0
 def test_015_goto_Clients_webpage(self):
     u"""点击窗口右上角可以跳转客户端页面(testlink_ID:1159)"""
     log.debug("015")
     tmp = OVBusiness(self.driver)
     result = tmp.goto_Client_webpage()
     assert result,"click goto button can't goto Clients webpage,test fail!"
     print "click goto button can goto Clients webpage,test pass!"
Exemple #6
0
 def test_019_config_master_ap_setup_failover_ap(self):
     u"""准备好master ap的配置及流量,设置好failover ap"""
     log.debug("019")
     tmp = APSBusiness(self.driver)
     #解除特定slave AP1的配对
     tmp.unpair_special_slave_AP(data_AP['slave:mac1'])
     #web页面退出登录
     tmp2 = NavbarBusiness(self.driver)
     tmp2.logout()
     #AP 下载/上传流量---master ap
     tmp1 = OVBusiness(self.driver)
     tmp1.set_AP_download_unload(data_wireless['all_ssid'],
         data_wireless["short_wpa"], data_basic['wlan_pc'], data_basic['lan_pc'])
     #重新登录AP
     Lg = LoginBusiness(self.driver)
     Lg.login(data_basic['superUser'], data_login['all'])
     #多个slave ap时,搜索并配对特定的ap
     tmp.search_pair_special_AP(data_AP['slave:mac2'])
     #设置slave ap为failover ap
     tmp.change_slave_to_failover(data_AP['slave:mac2'])
     #检查slave ap是否变为failover ap
     result = tmp.check_change_to_failover_AP(data_AP['slave:mac2'],
                 data_basic['DUT_ip'], data_basic['sshUser'], data_login['all'])
     self.assertTrue(result), "master ap and set failover ap ready, test fail!"
     print "master ap and set failover ap ready, test pass!"
Exemple #7
0
 def test_007_goto_AP_webpage(self):
     u"""点击窗口右上角可以跳转到接入点页面(testlink_ID:1147)"""
     log.debug("007")
     tmp = OVBusiness(self.driver)
     result = tmp.goto_AP_webpage()
     assert result,"click goto button can't goto AP webpage,test fail!"
     print "click goto button can goto AP webpage,test pass!"
Exemple #8
0
 def test_026_goto_Clients_webpage(self):
     u"""点击TOP AP右上角的三个小点,页面将跳转到接入点页面(testlink_ID:1179)"""
     log.debug("026")
     tmp = OVBusiness(self.driver)
     result = tmp.goto_TOP_AP_webpage()
     assert result,"click goto button can't goto AP webpage,test fail!"
     print "click goto button can goto AP webpage,test pass!"
Exemple #9
0
 def test_005_AP_num_online(self):
     u"""已发现的AP离线后,发现统计数目将更新(testlink_ID:1139)"""
     log.debug("005")
     tmp = OVBusiness(self.driver)
     #获取在线的AP数
     result = tmp.get_aponline()
     assert result == "2","check AP online number,test fail!"
     print "check AP online number,test pass!"
Exemple #10
0
 def test_028_SSID_upload(self):
     u"""ssid 上传流量统计的准确性(testlink_ID:1214)---有概率性bug"""
     log.debug("028")
     #ssid 上传流量统计的准确性
     tmp = OVBusiness(self.driver)
     result1,result2 = tmp.check_ssid_upload()
     assert ("MB" in result1) or ("GB" in result1),"test ssid upload fail!"
     print "test ssid upload pass!"
Exemple #11
0
 def test_029_SSID_download(self):
     u"""ssid 下载流量统计的准确性(testlink_ID:1215)"""
     log.debug("029")
     #ssid 下载流量统计的准确性
     tmp = OVBusiness(self.driver)
     result1,result2 = tmp.check_ssid_download()
     assert ("MB" in result1) or ("GB" in result1),"test ssid upload fail!"
     print "test ssid upload pass!"
Exemple #12
0
 def test_031_client_upload(self):
     u"""client 上传流量统计的准确性(testlink_ID:1224)"""
     log.debug("031")
     #client 上传流量统计的准确性
     tmp = OVBusiness(self.driver)
     result1,result2 = tmp.check_client_upload()
     assert ("MB" in result1) or ("GB" in result1),"test client upload fail!"
     print "test client upload pass!"
Exemple #13
0
 def test_006_AP_total(self):
     u"""AP总量统计正确(testlink_ID:1143)"""
     log.debug("006")
     tmp = OVBusiness(self.driver)
     #获取在线的AP数
     result = tmp.get_aptotal()
     assert result == "3","check AP total number,test fail!"
     print "check AP total number,test pass!"
Exemple #14
0
 def test_025_check_AP_type(self):
     u"""AP 类型可以正确显示(testlink_ID:1191)---有概率性bug"""
     log.debug("025")
     tmp = OVBusiness(self.driver)
     #登录web页面获取DUT的hostname
     DUT_hostname = tmp.get_DUT_hostname()
     result = tmp.get_top()
     assert (DUT_hostname in result),"AP type in TOP AP,test fail!"
     print "AP type in TOP AP,test pass!"
Exemple #15
0
 def test_022_TOP_AP(self):
     u"""TOP AP状态窗(每5分钟更新)(testlink_ID:1178)---有概率性bug"""
     log.debug("022")
     tmp2 = OVBusiness(self.driver)
     #已有添加一个slave ap到默认网络组后,检查TOP页面
     result = tmp2.step_001_check_top(data_ap['master:mac'],data_ap['slave:mac2'],\
         data_wireless['all_ssid'],data_basic['wlan_pc'])
     print result
     assert result,"Check TOP AP status,test fail!"
     print "Check TOP AP status,test pass!"
Exemple #16
0
 def test_018_masterAP_download(self):
     u"""AP 下载流量统计的准确性---master ap(testlink_ID:1196_1)---有概率性bug"""
     log.debug("018")
     tmp = OVBusiness(self.driver)
     #AP 下载流量统计的准确性---master ap
     result1,result2 = tmp.check_masterAP_download_backup(data_wireless['all_ssid'],\
             data_wireless["short_wpa"],data_basic['wlan_pc'],data_basic['lan_pc'],
             data_ap['master:mac'])
     assert ("MB" in result1) or ("GB" in result1),"check master ap download fail!"
     print "check master ap download pass!"
Exemple #17
0
 def check_mouse(self):
     tmp = NavbarControl(self.driver)
     #点击页面上的放大镜打开搜索框
     tmp.search_menu()
     #点击概览菜单
     tmp1 = OVBusiness(self.driver)
     tmp1.OV_menu()
     #检查页面中是否有搜索框
     result = tmp.check_search_input()
     return result
Exemple #18
0
 def test_003_AP_num_unpair(self):
     u"""已发现AP数量统计-已发现,但未配对(testlink_ID:1136)"""
     log.debug("003")
     tmp = OVBusiness(self.driver)
     #获取全部AP数
     result1 = tmp.get_aptotal()
     #检查AP的页面
     result2 = tmp.check_ap()
     assert (result1 == "3") and (result2 == ['2','1']),"check AP number on unpair slave ap,test fail!"
     print "check AP number on unpair slave ap,test pass!"
Exemple #19
0
 def test_013_slave_AP_client_num(self):
     u"""终端设备关联在Slave AP上,检查用户数量统计是否正确(testlink_ID:1155,1156)"""
     log.debug("013")
     #新增一个ssid
     NG2_ssid = "%s-2"%data_ng["NG2_ssid"]
     Add = SSIDBusiness(self.driver)
     Add.new_vlan_ssid(NG2_ssid,data_wireless["short_wpa"],"2")
     #多个网络组时,搜索-配对-加入ssid
     tmp1 = APSBusiness(self.driver)
     tmp1.search_pair_add(2,data_ap["slave:mac2"])
     #使用无线连接slave AP
     tmp1.connect_DHCP_WPA_AP(NG2_ssid,\
                 data_wireless["short_wpa"],data_basic['wlan_pc'])
     #等待2分钟
     time.sleep(120)
     tmp = OVBusiness(self.driver)
     tmp.OV_menu()
     #获取2.4G客户端数
     result1 = tmp.get_2g4_client()
     #获取5G客户端数
     result2 = tmp.get_5g_client()
     #释放无线网卡的ip
     tmp.dhcp_release_wlan(data_basic['wlan_pc'])
     tmp.disconnect_ap()
     assert (result1 == "1") or (result2 == "1"),\
         "check clients number when client connect slave AP,test fail!"
     print "check clients number when client connect slave AP,test pass!"
Exemple #20
0
 def test_022_failover_check_flow(self):
     u"""failover ap上,确认流量是否能够同步master ap(testlink_ID:2365)--bug83451"""
     log.debug("022")
     tmp = APSBusiness(self.driver)
     #登录failover ap的web界面
     tmp.login_failover_ap(data_basic['slave_web2'], "failover", data_login['all'])
     tmp1 = OVBusiness(self.driver)
     #获取第一个ap下载流量
     result1, result2 = tmp1.get_AP_download()
     assert ("MB" in result1) or ("GB" in result1)
     self.assertLess(0, result2), "failover ap,check the sync of failover ap's DB,test fail!"
     print "failover ap,check the sync of failover ap's DB,test pass!"
Exemple #21
0
 def test_042_failover_master_check_client_flow(self):
     u"""failover ap 切换到master ap模式后,确认ap 的流量有效(testlink_ID:2396)"""
     log.debug("042")
     tmp = APSBusiness(self.driver)
     #登录failover ap的web界面
     tmp.login_failover_ap(data_basic['slave_web2'],
         data_basic['superUser'], data_login['all'])
     #client下载流量统计的准确性
     tmp1 = OVBusiness(self.driver)
     result1, result2 = tmp1.check_client_download()
     assert ("MB" in result1) or ("GB" in result1)
     self.assertLess(0, result2), "after failover change to master check client traffic,test fail!"
     print "after failover change to master check client traffic,test pass!"
Exemple #22
0
 def test_040_failover_master_check_ap_flow(self):
     u"""failover ap 切换到master ap模式后,确认failover ap流量能正确更新到新的master ap上(testlink_ID:2395)"""
     log.debug("040")
     tmp = APSBusiness(self.driver)
     #登录failover ap的web界面
     tmp.login_failover_ap(data_basic['slave_web2'],
         data_basic['superUser'], data_login['all'])
     tmp1 = OVBusiness(self.driver)
     #获取第一个ap下载流量
     result1, result2 = tmp1.get_AP_download()
     assert ("MB" in result1) or ("GB" in result1)
     self.assertLess(0, result2), "after failover change to master check ap traffic,test fail!"
     print "after failover change to master check ap traffic,test pass!"
Exemple #23
0
 def test_004_AP_num_pair(self):
     u"""已发现AP数量统计-发现后,配对AP,AP数量不统计在发现AP中(testlink_ID:1137)"""
     log.debug("004")
     #只有默认时,搜索-配对-加入网络组
     tmp1 = APSBusiness(self.driver)
     tmp1.search_pair_add_default(data_ap["slave:mac2"])
     #返回概览页面
     tmp = OVBusiness(self.driver)
     tmp.OV_menu()
     #获取已发现的AP数
     time.sleep(30)
     result = tmp.get_apdiscovered()
     assert result == "1","check AP number on pair slave ap,test fail!"
     print "check AP number on pair slave ap,test pass!"
Exemple #24
0
 def test_002_AP_status(self):
     u"""AP状态窗(实时更新)(testlink_ID:1135)"""
     log.debug("002")
     tmp = OVBusiness(self.driver)
     #获取全部AP数
     result1 = tmp.get_aptotal()
     #检查AP的页面
     result2 =\
         tmp.check_ap()
     #解除最后两个slave AP的配对
     tmp1 = APSBusiness(self.driver)
     tmp1.unpair_last_slave_ap(1)
     assert (result1 == "3") and (result2 == ['1','2']),"check AP status,test fail!"
     print "check AP status,test pass!"
Exemple #25
0
 def test_016_check_Clients_webpage(self):
     u"""Client数量和状态必须与客户端页面的信息一致(testlink_ID:1160)"""
     log.debug("016")
     tmp = OVBusiness(self.driver)
     #获取2.4G客户端数
     result1 = tmp.get_2g4_client()
     #获取5G客户端数
     result2 = tmp.get_5g_client()
     result = (int(result1)+int(result2))
     tmp1 = ClientsBusiness(self.driver)
     tmp1.clients_menu()
     num = tmp1.get_clients_num()
     assert result == num,"check client number is different as Clients webpage,test fail!"
     print "check client number is same as Clients webpage,test pass!"
Exemple #26
0
 def test_017_check_AP_webpage(self):
     u"""Client数量和状态必须与AP配置页面的client信息一致(testlink_ID:1161)"""
     log.debug("017")
     tmp = OVBusiness(self.driver)
     #获取2.4G客户端数
     result1 = tmp.get_2g4_client()
     #获取5G客户端数
     result2 = tmp.get_5g_client()
     result = (int(result1)+int(result2))
     #获取所有用户设备数
     tmp1 = APSBusiness(self.driver)
     num = tmp1.check_users_num()
     assert result == num,"check client number is different as AP webpage,test fail!"
     print "check client number is same as AP webpage,test pass!"
Exemple #27
0
    def test_019_masterAP_upload(self):
        u"""AP 上传流量统计的准确性---master ap(testlink_ID:1195_1)---有概率性bug"""
        log.debug("019")
        tmp = OVBusiness(self.driver)
        #AP 上传流量统计的准确性---master ap
        result1,result2 = tmp.check_masterAP_upload_backup(data_wireless['all_ssid'],\
                data_wireless["short_wpa"],data_basic['wlan_pc'],data_basic['lan_pc'],
                data_ap['master:mac'])
        #master AP切换到Dual-Band
        tmp1 = SSIDBusiness(self.driver)
        tmp1.change_AP_Freq("Dual-Band")

        assert ("MB" in result1) or ("GB" in result1),"check master ap upload fail!"
        print "check master ap upload pass!"
Exemple #28
0
    def test_021_slaveAP_upload(self):
        u"""AP 上传流量统计的准确性---slave ap(testlink_ID:1195_2)---有概率性bug"""
        log.debug("021")
        NG2_ssid = "%s-2"%data_ng["NG2_ssid"]
        tmp = OVBusiness(self.driver)
        #AP 上传流量统计的准确性---slave ap
        result1,result2 = tmp.check_slaveAP_upload_backup(NG2_ssid,\
                data_wireless["short_wpa"],data_basic['wlan_pc'],data_basic['lan_pc'],
                data_ap["slave:mac2"])
        #删除7000新建的网络组
        tmp1 = NGBusiness(self.driver)
        tmp1.mixed_7000_del_NG()

        assert ("MB" in result1) or ("GB" in result1),"check slave ap upload fail!"
        print "check slave ap upload pass!"
Exemple #29
0
    def test_020_slaveAP_download(self):
        u"""AP 下载流量统计的准确性---slave ap(testlink_ID:1196_2)---有概率性bug"""
        log.debug("020")
        NG2_ssid = "%s-2"%data_ng["NG2_ssid"]
        #多个网络组时,搜索-配对-加入网络组
        tmp1 = APSBusiness(self.driver)
        tmp1.search_pair_add(2,data_ap["slave:mac2"])

        tmp = OVBusiness(self.driver)
        tmp.OV_menu()
        #AP 下载流量统计的准确性---有概率性bug
        result1,result2 = tmp.check_slaveAP_download_backup(NG2_ssid,\
                data_wireless["short_wpa"],data_basic['wlan_pc'],data_basic['lan_pc'],
                data_ap["slave:mac2"])
        assert ("MB" in result1) or ("GB" in result1),"check slave ap download fail!"
        print "check slave ap download pass!"
Exemple #30
0
 def test_037_failover_check_flow(self):
     u"""failover ap 切换到master ap模式后,检查ap流量能正确显示(testlink_ID:2409)"""
     log.debug("037")
     tmp = APSBusiness(self.driver)
     #master ap关闭controller
     tmp.close_master_controller(data_basic['DUT_ip'],
         data_basic['sshUser'], data_login['all'])
     #等待10分钟
     time.sleep(610)
     #登录failover ap的web界面
     tmp.login_failover_ap(data_basic['slave_web2'], "failover", data_login['all'])
     #AP 下载/上传流量---master ap
     tmp1 = OVBusiness(self.driver)
     tmp1.set_AP_download_unload(data_ng['NG2_ssid'],
         data_wireless["short_wpa"], data_basic['wlan_pc'], data_basic['lan_pc'])
     # 作为failover登录AP
     Lg = LoginBusiness(self.driver)
     Lg.login("failover", data_login['all'])
     #获取第一个ap下载流量
     result1, result2 = tmp1.get_AP_download()
     assert ("MB" in result1) or ("GB" in result1)
     self.assertLess(0, result2), "after failover change to master check ap traffic,test fail!"
     print "after failover change to master check ap traffic,test pass!"