Beispiel #1
0
 def test_031_check_1d_overview_top_clients(self):
     u"""验证最近一天监控面板-概览-Top Clients,第一个client的mac地址"""
     log.debug("031")
     tmp = OverViewBusiness(self.s)
     wlan_mac = tmp.get_wlan_mac(data_basic['wlan_pc'])
     result = tmp.check_overview_top_client("1d", wlan_mac)
     self.assertTrue(result)
Beispiel #2
0
 def test_030_check_network_2h_overview_top_ap_name(self):
     u"""验证default network最近两小时监控面板-概览-top ap的mac对应的name正确"""
     log.debug("030")
     tmp = OverViewBusiness(self.s)
     mac = data_ap['7610_mac'].upper()
     name = tmp.get_overview_top_aps_name("2h", mac, menu=9)
     self.assertEqual("autotest_7610", name)
Beispiel #3
0
 def test_010_overview_client_count(self):
     u"""检查监控-概览--client数量"""
     log.debug("010")
     tmp = OverViewBusiness(self.s)
     result = tmp.get_overview_client_count_detail()
     result1 = result[1]['value']
     self.assertEqual(result1, 1)
Beispiel #4
0
 def test_033_check_network_2h_overview_top_clients(self):
     u"""验证default network最近2小时监控面板-概览-Top Clients,第一个client的mac地址"""
     log.debug("033")
     tmp = OverViewBusiness(self.s)
     wlan_mac = tmp.get_wlan_mac(data_basic['wlan_pc'])
     result = tmp.check_overview_top_client("2h", wlan_mac, menu=9)
     self.assertTrue(result)
Beispiel #5
0
 def test_015_check_change_ssid_client_count(self):
     u"""将client切换ssid,验证network-概览-client数量"""
     log.debug("015")
     #选择进入group1网络组
     tmp1 = NetworkListBusiness(self.s)
     tmp1.goin_network("group1")
     tmp2 = OverViewBusiness(self.s)
     #AP 上传流量统计的准确性
     tmp3 = APSBusiness(self.s)
     #新增一个network
     tmp = SSIDSBusiness(self.s)
     tmp.add_ssid(data_ap['7600_mac'],
                  data_wireless['grou1_all_ssid'] + "-2",
                  data_wireless['short_wpa'])
     time.sleep(60)
     tmp3.run_AP_download_back(data_wireless['grou1_all_ssid'] + "-2",
                               data_wireless['short_wpa'],
                               data_basic['wlan_pc'], data_basic['lan_pc'])
     time.sleep(360)
     #AP 上传流量统计的准确性
     result = tmp.connect_DHCP_WPA_AP(
         data_wireless['grou1_all_ssid'] + "-2", data_wireless['short_wpa'],
         data_basic['wlan_pc'])
     tmp.dhcp_release_wlan_backup(data_basic['wlan_pc'])
     result1 = tmp2.get_overview_client_count()
     self.assertIn(data_wireless['grou1_all_ssid'] + "-2", result)
     self.assertEqual(result1, 1)
Beispiel #6
0
 def test_035_check_1d_overview_top_ssids(self):
     u"""验证最近一天监控面板-概览-Top SSIDs,第一个SSID的name"""
     log.debug("035")
     tmp = OverViewBusiness(self.s)
     name = tmp.get_overview_top_ssids_name("1d")
     self.assertIn(data_wireless['all_ssid'], name)
     self.assertIn(data_wireless['grou1_all_ssid'], name)
Beispiel #7
0
 def test_004_check_overview_ap_online_offline(self):
     u"""获取监控面板-概览-AP在线和离线"""
     log.debug("004")
     tmp = OverViewBusiness(self.s)
     result, result1 = tmp.get_overview_ap_online_offline_count()
     self.assertEqual(result, 3)
     self.assertEqual(result1, 0)
Beispiel #8
0
 def test_036_check_2h_overview_top_ssids(self):
     u"""验证最近两小时监控面板-概览-Top SSIDs"""
     log.debug("036")
     tmp = OverViewBusiness(self.s)
     name = tmp.get_overview_top_ssids_name("2h")
     self.assertIn(data_wireless['all_ssid'], name)
     self.assertIn(data_wireless['grou1_all_ssid'], name)
Beispiel #9
0
 def test_037_check_network_2h_overview_top_ssids_usage(self):
     u"""验证最近两小时监控面板-概览-Top SSIDs的usage"""
     log.debug("037")
     tmp = OverViewBusiness(self.s)
     usage = tmp.get_overview_top_ssids_usage("2h")
     self.assertGreater(usage[0], usage[1])
     self.assertGreater(usage[1], usage[2])
Beispiel #10
0
 def test_014_get_network_overview_client_count(self):
     u"""检查network-概览--client数量"""
     log.debug("014")
     tmp = OverViewBusiness(self.s)
     tmp1 = NetworkListBusiness(self.s)
     tmp1.goin_network("group1")
     result = tmp.get_overview_client_count()
     self.assertEqual(result, 1)
Beispiel #11
0
 def test_039_check_network_2h_overview_top_ssids_usage(self):
     u"""验证group1最近两小时监控面板-概览-Top SSIDs的usage"""
     log.debug("039")
     tmp = OverViewBusiness(self.s)
     tmp1 = NetworkListBusiness(self.s)
     tmp1.goin_network('group1')
     usage = tmp.get_overview_top_ssids_usage("2h", menu=9)
     self.assertGreater(usage[0], usage[1])
 def test_006_check_overview_client_count_equal_2g4_and_5g(self):
     u"""验证客户端2.4G+5G=总数"""
     log.debug("006")
     tmp = OverViewBusiness(self.s)
     result = tmp.get_overview_client_count()
     g24_client_count, g5_client_count = tmp.get_overview_client_online_offline_count(
     )
     self.assertEqual(result, (g24_client_count + g5_client_count))
 def test_004_check_overview_ap_online_offline_count(self):
     u"""验证监控面板-概览-在线和离线AP数"""
     log.debug("004")
     tmp = OverViewBusiness(self.s)
     online_ap_count, offline_ap_count = tmp.get_overview_ap_online_offline_count(
     )
     self.assertEqual(online_ap_count, 3)
     self.assertEqual(offline_ap_count, 0)
Beispiel #14
0
 def test_017_check_network_1d_overview_last_clientcount(self):
     u"""验证default network最近1天监控面板-概览-客户端数量,返回最后一条客户端在线数量"""
     log.debug("017")
     tmp = OverViewBusiness(self.s)
     #选择进入group1网络组
     tmp1 = NetworkListBusiness(self.s)
     tmp1.goin_network("group1")
     clientcount = tmp.get_overview_last_clientcount("1d", menu=9)
     self.assertEqual(clientcount, 1)
Beispiel #15
0
 def test_005_check_network_overview(self):
     u"""获取某个network的AP总数"""
     log.debug("005")
     tmp = OverViewBusiness(self.s)
     #选择进入group1网络组
     tmp1 = NetworkListBusiness(self.s)
     tmp1.goin_network("group1")
     result = tmp.get_network_overview_ap_count()
     self.assertEqual(result, 1)
Beispiel #16
0
 def test_024_check_2h_overview_top_ap_mac(self):
     u"""验证最近两小时监控面板-概览-top ap的mac"""
     log.debug("024")
     tmp = OverViewBusiness(self.s)
     ap_mac = tmp.get_overview_top_aps_mac("2h")
     mac1 = data_ap['7600_mac'].upper()
     mac2 = data_ap['7610_mac'].upper()
     self.assertIn(mac1, ap_mac)
     self.assertIn(mac2, ap_mac)
Beispiel #17
0
 def test_026_check_network_2h_overview_top_ap_mac(self):
     u"""验证最近两小时监控面板-概览-top ap的mac"""
     log.debug("026")
     tmp = OverViewBusiness(self.s)
     #选择进入group1网络组
     tmp1 = NetworkListBusiness(self.s)
     tmp1.goin_network("group1")
     ap_mac = tmp.get_overview_top_aps_mac("2h", menu=9)
     mac1 = data_ap['7600_mac'].upper()
     self.assertIn(mac1, ap_mac)
Beispiel #18
0
 def test_006_check_network_ap_online_offline_count(self):
     u"""获取某个network概览-AP在线和离线数量"""
     log.debug("006")
     tmp = OverViewBusiness(self.s)
     #选择进入group1网络组
     tmp1 = NetworkListBusiness(self.s)
     tmp1.goin_network("group2")
     result, result1 = tmp.get_network_overview_ap_online_offline_count()
     self.assertEqual(result, 1)
     self.assertEqual(result1, 0)
Beispiel #19
0
 def test_041_check_network_2h_overview_top_ssids(self):
     u"""验证group1 network中最近两小时监控面板-概览-Top SSIDs ssid与netwrok之间的对应关系"""
     log.debug("041")
     tmp = OverViewBusiness(self.s)
     tmp1 = NetworkListBusiness(self.s)
     tmp1.goin_network('group1')
     network1 = tmp.get_overview_top_ssids_network(
         "2h", data_wireless['grou1_all_ssid'], menu=9)
     network2 = tmp.get_overview_top_ssids_network(
         "2h", data_wireless['grou1_all_ssid'] + "-2", menu=9)
     self.assertEqual(network1, 'group1')
     self.assertEqual(network2, 'group1')
Beispiel #20
0
 def test_040_check_2h_overview_top_ssids(self):
     u"""验证最近两小时监控面板-概览-Top SSIDs ssid与netwrok之间的对应关系"""
     log.debug("040")
     tmp = OverViewBusiness(self.s)
     network = tmp.get_overview_top_ssids_network("2h",
                                                  data_wireless['all_ssid'])
     network1 = tmp.get_overview_top_ssids_network(
         "2h", data_wireless['grou1_all_ssid'])
     network2 = tmp.get_overview_top_ssids_network(
         "2h", data_wireless['grou1_all_ssid'] + "-2")
     self.assertEqual(network, 'default')
     self.assertEqual(network1, 'group1')
     self.assertEqual(network2, 'group1')
Beispiel #21
0
 def test_029_check_2h_overview_top_ap_name(self):
     u"""验证最近两小时监控面板-概览-top ap的mac对应的name正确"""
     log.debug("029")
     tmp = OverViewBusiness(self.s)
     mac = data_ap['7610_mac'].upper()
     mac1 = data_ap['7600_mac'].upper()
     mac2 = data_ap['7600lr_mac'].upper()
     name = tmp.get_overview_top_aps_name("2h", mac)
     name1 = tmp.get_overview_top_aps_name("2h", mac1)
     name2 = tmp.get_overview_top_aps_name("2h", mac2)
     self.assertEqual("autotest_7610", name)
     self.assertEqual("autotest_7600", name1)
     self.assertEqual("autotest_7600lr", name2)
Beispiel #22
0
 def test_003_check_overview_ap_count(self):
     u"""获取监控面板-概览-AP总数"""
     log.debug("003")
     tmp = OverViewBusiness(self.s)
     result = tmp.get_overview_ap_count()
     self.assertEqual(result, 3)
 def test_012_check_2h_overview_last_clientcount(self):
     u"""验证最近2小时监控面板-概览-Top Aps,第一个ap的信息"""
     log.debug("012")
     tmp = OverViewBusiness(self.s)
     apType = tmp.get_overview_top_aps("2h")['apType']
     self.assertIn("GWN76", apType)
 def test_014_check_2h_overview_top_ssids(self):
     u"""验证最近2小时监控面板-概览-Top SSIDs,第一个SSID的name"""
     log.debug("014")
     tmp = OverViewBusiness(self.s)
     name = tmp.get_overview_top_ssids("2h")
     self.assertEqual(name, data_wireless['all_ssid'])
Beispiel #25
0
 def test_011_get_network_overview_total_client_count(self):
     u"""检查network-概览--client数量"""
     log.debug("011")
     tmp = OverViewBusiness(self.s)
     result = tmp.get_overview_client_count()
     self.assertEqual(result, 1)
Beispiel #26
0
 def test_034_check_network_2h_overview_top_clients_usage(self):
     u"""验证最近2小时监控面板-概览-Top Clients,第一个client的usage不为0"""
     log.debug("034")
     tmp = OverViewBusiness(self.s)
     result = tmp.check_overview_top_client_usage("2h")
     self.assertTrue(result)
Beispiel #27
0
 def test_018_check_2h_overview_last_clientcount(self):
     u"""验证最近2小时监控面板-概览-客户端数量,返回最后一条客户端在线数量"""
     log.debug("018")
     tmp = OverViewBusiness(self.s)
     clientcount = tmp.get_overview_last_clientcount("2h")
     self.assertEqual(clientcount, 1)
Beispiel #28
0
 def test_020_check_1d_overview_top_ap_count(self):
     u"""验证最近一天监控面板-概览-top ap"""
     log.debug("020")
     tmp = OverViewBusiness(self.s)
     ap_count = tmp.get_overview_top_aps_count("1d")
     self.assertEqual(ap_count, 3)
Beispiel #29
0
 def test_022_check_network_2h_overview_top_ap_count(self):
     u"""验证最近一天监控面板-概览-top ap"""
     log.debug("022")
     tmp = OverViewBusiness(self.s)
     ap_count = tmp.get_overview_top_aps_count("2h", menu=9)
     self.assertEqual(ap_count, 1)
Beispiel #30
0
 def test_028_check_2h_overview_top_ap_usage(self):
     u"""验证最近两小时监控面板-概览-top ap的usage排序正确"""
     log.debug("028")
     tmp = OverViewBusiness(self.s)
     usage = tmp.get_overview_top_aps_usage("2h")
     self.assertGreater(usage[0], usage[1])