from system_settings.maintenance.upgrade.upgrade_business import UpgradeBusiness from setupwizard.setupwizard_business import SWBusiness from clients.client_access.clientaccess_business import ClientAccessBusiness from data import data from connect.ssh import SSH from data.logfile import Log reload(sys) sys.setdefaultencoding('utf-8') data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_ng = data.data_networkgroup() data_AP = data.data_AP() log = Log("APdhcpserver") class TestAPDhcpServer(unittest.TestCase): u"""测试AP DHCP Server的用例集(runtime:2h)""" def setUp(self): # firefox_profile = webdriver.FirefoxProfile(data_basic['firefox_profile']) # self.driver = webdriver.Firefox(firefox_profile=firefox_profile) self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(60) #登录AP Lg = LoginBusiness(self.driver) Lg.login(data_basic['superUser'], data_login['all'])
import unittest, time from selenium import webdriver from login.login_business import LoginBusiness from network.wirelesssettings.wirelesssettings_business import WirelessSettingsBusiness from network.wansettings.wansettings_business import WanSettingsBusiness from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from connect.ssh import SSH from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() log = Log("WirelessSettings") class TestWirelessSettings(unittest.TestCase): """测试无线设置的用例集(Duration:1.42h)""" def setUp(self): self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver) #调用实例的登录AP的web界面 Lg.login(data_basic['superUser'], data_basic['super_defalut_pwd']) #刷新页面重新登录ap页面 Lg.refresh_login_ap()
#from network_group.networkgroup_business import NGBusiness from ssid.ssid_business import SSIDBusiness from network_group.add_ssid.addssid_business import AddSSIDBusiness from data import data from connect.ssh import SSH from data.logfile import Log reload(sys) sys.setdefaultencoding('utf-8') data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_AP = data.data_AP() data_ng = data.data_networkgroup() data_client = data.data_Client() log = Log("Clienttimepolicy") class TestClientTimePolicy(unittest.TestCase): u"""测试客户端时间策略的用例集(runtime:2h)""" def setUp(self): # firefox_profile = webdriver.FirefoxProfile(data_basic['firefox_profile']) # self.driver = webdriver.Firefox(firefox_profile=firefox_profile) self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(60) #登录AP Lg = LoginBusiness(self.driver) Lg.login(data_basic['superUser'],data_login['all']) #在页面上把AP恢复出厂设置(testlink_ID:773)
from system_settings.maintenance.upgrade.upgrade_business import UpgradeBusiness from system_settings.maintenance.access.access_business import AccessBusiness from system_settings.maintenance.basic.basic_business import BasicBusiness from overview.overview_business import OVBusiness from data import data from connect.ssh import SSH from navbar.navbar_business import NavbarBusiness from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_ng = data.data_networkgroup() data_AP = data.data_AP() data_Client = data.data_Client() log = Log("Failover") class TestFailover(unittest.TestCase): u"""测试Failover的用例集(runtime:4h)""" def setUp(self): # firefox_profile = webdriver.FirefoxProfile(data_basic['firefox_profile']) # self.driver = webdriver.Firefox(firefox_profile=firefox_profile) self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(60) #登录AP Lg = LoginBusiness(self.driver) Lg.login(data_basic['superUser'],data_login['all']) #在页面上把AP恢复出厂设置(testlink_ID:773) def test_001_factory_reset(self):
#时间:2017.03.10 #描述:用例层代码,调用login_business import unittest,time from selenium import webdriver from login.login_business import LoginBusiness from setupwizard.setupwizard_business import SWBusiness from connect.ssh import SSH from data import data from system_settings.maintenance.upgrade.upgrade_business import UpgradeBusiness from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_AP = data.data_AP() log = Log("Login") class TestLogin(unittest.TestCase): u"""测试登录的用例集(runtime:8m)""" def setUp(self): # firefox_profile = webdriver.FirefoxProfile(data_basic['firefox_profile']) # self.driver = webdriver.Firefox(firefox_profile=firefox_profile) self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(60) #登录路由后台把AP恢复出厂设置 def test_001_factory_reset(self): u"""登录路由后台把AP恢复出厂设置""" log.debug("001") #逻辑类对象,建一个实例
from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from workmode.workmode_business import WorkModeBusiness from stateinfo.stateinfo_business import StateInfoBusiness from network.wirelesssettings.wirelesssettings_business import WirelessSettingsBusiness from network.wansettings.wansettings_business import WanSettingsBusiness from connect.ssh import SSH from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wirless = data.data_wireless() data_wan = data.data_wan() data_lan = data.data_lan() log = Log("SystemUpgrade") AP_model = "IAP2312N-2T" class TestSystemUpgrade(unittest.TestCase): """测试系统升级的用例集(Duration:1.35h)""" def setUp(self): self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver) #调用实例的登录AP的web界面 Lg.login(data_basic['superUser'], data_basic['super_defalut_pwd']) #刷新页面重新登录ap页面
#描述:用例集,调用setupwizard_business import unittest from selenium import webdriver from login.login_business import LoginBusiness from setupwizard.setupwizard_business import SWBusiness from system_settings.maintenance.upgrade.upgrade_business import UpgradeBusiness from connect.ssh import SSH from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_AP = data.data_AP() log = Log("Setupwozard") class TestSetupWizard(unittest.TestCase): u"""测试设置向导的用例集(runtime:0.5h)""" def setUp(self): # firefox_profile = webdriver.FirefoxProfile(data_basic['firefox_profile']) # self.driver = webdriver.Firefox(firefox_profile=firefox_profile) self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(60) #登录AP Lg = LoginBusiness(self.driver) Lg.login(data_basic['superUser'], data_login['all'])
import unittest, time, os from selenium import webdriver from login.login_business import LoginBusiness from firewall.urlfilter.urlfilter_business import UrlFilterBusiness from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from workmode.workmode_business import WorkModeBusiness from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wirless = data.data_wireless() data_lan = data.data_lan() data_wan = data.data_wan() log = Log("URLFilter") class TestURLFilter(unittest.TestCase): """测试URL过滤的用例集(Duration:0.25h)""" def setUp(self): self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver) #调用实例的登录AP的web界面 Lg.login(data_basic['superUser'], data_basic['super_defalut_pwd']) #刷新页面重新登录ap页面 Lg.refresh_login_ap()
#coding=utf-8 #作者:曾祥卫 #时间:2018.06.12 #描述:system-upgrade用例集,调用upgrade_business import unittest, time from access_points.aps_business import APSBusiness from system.settings.settings_business import SettingsBusiness from clients.clients_business import Clients_Business from system.upgrade.upgrade_business import UpgradeBusiness from data import data from data.logfile import Log import requests log = Log("upgrade") data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_ng = data.data_networkgroup() data_ap = data.data_AP() data_client = data.data_Client() class TestUpgrade(unittest.TestCase): u"""测试system-upgrade的用例集(runtime:0.44h)""" def setUp(self): self.s = requests.session() tmp = Clients_Business(self.s) #使用用户名密码,带着cookie登录cloud,并返回响应数据 tmp.webLogin(data_basic['cloud_user'], data_basic['cloud_pwd'])
import unittest, time from selenium import webdriver from login.login_business import LoginBusiness from network.wansettings.wansettings_business import WanSettingsBusiness from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from stateinfo.stateinfo_business import StateInfoBusiness from connect.ssh import SSH from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wirless = data.data_wireless() data_wan = data.data_wan() log = Log("WanSettings") class TestWanSettings(unittest.TestCase): """测试外网设置的用例集(Duration:0.14h)""" def setUp(self): self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver) #调用实例的登录AP的web界面 Lg.login(data_basic['superUser'], data_basic['super_defalut_pwd']) #刷新页面重新登录ap页面 Lg.refresh_login_ap()
#时间:2018.05.31 #描述:Network-Access Control-Time Policy用例集,调用TimePolcy_business import unittest, time, subprocess from access_points.aps_business import APSBusiness from system.settings.settings_business import SettingsBusiness from ssids.ssids_business import SSIDSBusiness from clients.clients_business import Clients_Business from access_control.access_list.accesslist_business import AccessListBusiness from access_control.time_policy.timepolicy_business import TimePolicyBusiness from data import data from connect.ssh import SSH from data.logfile import Log import requests log = Log("timepolicy") data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_ng = data.data_networkgroup() data_ap = data.data_AP() data_client = data.data_Client() class TestTimePolicy(unittest.TestCase): u"""测试Network-Access Control-Time Policy的用例集(runtime:*h)""" def setUp(self): self.s = requests.session() tmp = TimePolicyBusiness(self.s) #使用用户名密码,带着cookie登录cloud,并返回响应数据
from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from network.wansettings.wansettings_business import WanSettingsBusiness from network.wirelesssettings.wirelesssettings_business import WirelessSettingsBusiness from workmode.workmode_business import WorkModeBusiness from stateinfo.stateinfo_business import StateInfoBusiness from connect.ssh import SSH from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wirless = data.data_wireless() data_wan = data.data_wan() data_lan = data.data_lan() log = Log("RebootSystem") class TestRebootSystem(unittest.TestCase): """测试系统重启的用例集(Duration:0.58h)""" def setUp(self): self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver) #调用实例的登录AP的web界面 Lg.login(data_basic['superUser'], data_basic['super_defalut_pwd']) #刷新页面重新登录ap页面 Lg.refresh_login_ap()
from login.login_business import LoginBusiness from overview.overview_business import OVBusiness from access_points.aps_business import APSBusiness from setupwizard.setupwizard_business import SWBusiness from network_group.networkgroup_business import NGBusiness from ssid.ssid_business import SSIDBusiness from clients.clients_business import ClientsBusiness from data import data from connect.ssh import SSH from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_ng = data.data_networkgroup() data_ap = data.data_AP() log = Log("Overview") class TestOverView(unittest.TestCase): u"""测试概览的用例集(runtime:1h40m)""" def setUp(self): # firefox_profile = webdriver.FirefoxProfile(data_basic['firefox_profile']) # self.driver = webdriver.Firefox(firefox_profile=firefox_profile) self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(60) #登录AP Lg = LoginBusiness(self.driver) Lg.login(data_basic['superUser'],data_login['all']) # #在页面上把AP恢复出厂设置,并运行设置向导并配对slave ap,修改ssid,密码(testlink_ID:773) # def test_001_factory_reset_setupwizard(self):
from selenium import webdriver from login.login_business import LoginBusiness from firewall.portforward.portforward_business import PortForwardBusiness from firewall.ipfilter.ipfilter_business import IPFilterBusiness from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from workmode.workmode_business import WorkModeBusiness from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wirless = data.data_wireless() data_lan = data.data_lan() data_wan = data.data_wan() log = Log("PortForward") class TestPortForward(unittest.TestCase): """测试端口转发的用例集(Duration:0.25h)""" def setUp(self): self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver) #调用实例的登录AP的web界面 Lg.login(data_basic['superUser'], data_basic['super_defalut_pwd']) #刷新页面重新登录ap页面 Lg.refresh_login_ap()
import unittest, time from selenium import webdriver from login.login_business import LoginBusiness from network.lansettings.lansettings_business import LanSettingsBusiness from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from connect.ssh import SSH from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wirless = data.data_wireless() data_lan = data.data_lan() log = Log("LanSettings") class TestLanSettings(unittest.TestCase): """测试内网设置的用例集(Duration:0.52h)""" def setUp(self): self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver) #调用实例的登录AP的web界面 Lg.login(data_basic['superUser'], data_basic['super_defalut_pwd']) #刷新页面重新登录ap页面 Lg.refresh_login_ap()
#coding=utf-8 #作者:曾祥卫 #时间:2018.06.11 #描述:cloud监控面板-网络列表用例集,调用networklist_business import unittest, time from dashboard.network_list.networklist_business import NetworkListBusiness from navbar.user.user_business import UserBusiness from dashboard.ap_list.allaplist_business import AllApListBusiness from access_points.aps_business import APSBusiness from ssids.ssids_business import SSIDSBusiness from data import data from data.logfile import Log import requests log = Log("networklist") data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_ng = data.data_networkgroup() data_ap = data.data_AP() data_client = data.data_Client() class TestNetworkList(unittest.TestCase): u"""测试监控面板-网络列表的用例集(runtime:0.25h)""" def setUp(self): self.s = requests.session()
import unittest, time from selenium import webdriver from login.login_business import LoginBusiness from network.wirelesssettings.wirelesssettings_business import WirelessSettingsBusiness from wirelessclient.wirelessclient_business import WirelessClientBusiness from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from connect.ssh import SSH from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wirless = data.data_wireless() log = Log("WirelessClient") class TestWirelessClient(unittest.TestCase): """测试无线用户的用例集(Duration:0.50h)""" def setUp(self): self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver) #调用实例的登录AP的web界面 Lg.login(data_basic['superUser'], data_basic['super_defalut_pwd']) #刷新页面重新登录ap页面 Lg.refresh_login_ap()
import unittest, time from selenium import webdriver from login.login_business import LoginBusiness from firewall.macfilter.macfilter_business import MacFilterBusiness from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from workmode.workmode_business import WorkModeBusiness from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wirless = data.data_wireless() data_lan = data.data_lan() data_wan = data.data_wan() log = Log("MACFilter") class TestMACFilter(unittest.TestCase): """测试MAC过滤的用例集(Duration:0.27h)""" def setUp(self): self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver) #调用实例的登录AP的web界面 Lg.login(data_basic['superUser'], data_basic['super_defalut_pwd']) #刷新页面重新登录ap页面 Lg.refresh_login_ap()
import unittest import time, subprocess from selenium import webdriver import sys from clients.client_access.clientaccess_business import ClientAccessBusiness from login.login_business import LoginBusiness from clients.clients_business import ClientsBusiness from system_settings.maintenance.upgrade.upgrade_business import UpgradeBusiness from access_points.aps_business import APSBusiness from ssid.ssid_business import SSIDBusiness from data import data from data.logfile import Log reload(sys) sys.setdefaultencoding('utf-8') log = Log("Clients") data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_AP = data.data_AP() data_ng = data.data_networkgroup() data_client = data.data_Client() class TestClients(unittest.TestCase): u"""测试客户端的用例集(runtime:1h)""" def setUp(self): # firefox_profile = webdriver.FirefoxProfile(data_basic['firefox_profile']) # self.driver = webdriver.Firefox(firefox_profile=firefox_profile) self.driver = webdriver.Firefox() self.driver.maximize_window()
#作者:曾祥卫 #时间:2018.06.14 #描述:cloud监控面板-概览用例集,调用overview_business import unittest, time from dashboard.overview.overview_business import OverViewBusiness from system.settings.settings_business import SettingsBusiness from dashboard.network_list.networklist_business import NetworkListBusiness from navbar.user.user_business import UserBusiness from dashboard.ap_list.allaplist_business import AllApListBusiness from access_points.aps_business import APSBusiness from ssids.ssids_business import SSIDSBusiness from data import data from data.logfile import Log import requests log = Log("overview") data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_ng = data.data_networkgroup() data_ap = data.data_AP() data_client = data.data_Client() class TestOverview(unittest.TestCase): u"""测试监控面板-概览的用例集(runtime:0.44h)""" def setUp(self): self.s = requests.session() tmp = NetworkListBusiness(self.s) #使用用户名密码,带着cookie登录cloud,并返回响应数据
#作者:曾祥卫 #时间:2018.06.12 #描述:navbar-user用例集,调用user_business import unittest, time from navbar.user.user_business import UserBusiness from dashboard.network_list.networklist_business import NetworkListBusiness from access_points.aps_business import APSBusiness from system.settings.settings_business import SettingsBusiness from ssids.ssids_business import SSIDSBusiness from clients.clients_business import Clients_Business from system.upgrade.upgrade_business import UpgradeBusiness from data import data from data.logfile import Log import requests log = Log("user") data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_ng = data.data_networkgroup() data_ap = data.data_AP() data_client = data.data_Client() class TestUser(unittest.TestCase): u"""测试navbar-user的用例集(runtime:0.39h)""" def setUp(self):
import unittest import time from selenium import webdriver from selenium.webdriver.common.keys import Keys from ssid.ssid_business import SSIDBusiness from login.login_business import LoginBusiness from navbar.navbar_business import NavbarBusiness from access_points.aps_business import APSBusiness from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_AP = data.data_AP() data_navbar = data.data_navbar() log = Log("Navbar") class TestNavbar(unittest.TestCase): u"""测试导航的用例集(runtime:40m)""" def setUp(self): # firefox_profile = webdriver.FirefoxProfile(data_basic['firefox_profile']) # self.driver = webdriver.Firefox(firefox_profile=firefox_profile) self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(60) #登录AP Lg = LoginBusiness(self.driver) Lg.login(data_basic['superUser'],data_login['all']) #在页面上把AP恢复出厂设置(testlink_ID:773) def test_001_factory_reset(self):
from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from network.wirelesssettings.wirelesssettings_business import WirelessSettingsBusiness from network.wansettings.wansettings_business import WanSettingsBusiness from workmode.workmode_business import WorkModeBusiness from stateinfo.stateinfo_business import StateInfoBusiness from connect.ssh import SSH from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wirless = data.data_wireless() data_wan = data.data_wan() data_lan = data.data_lan() log = Log("ConfigUpdate") class TestConfigUpdate(unittest.TestCase): """测试配置更新的用例集(Duration:1.05h)""" def setUp(self): fp = webdriver.FirefoxProfile() fp.set_preference("browser.download.folderList",2) fp.set_preference("browser.download.manager.showWhenStarting",False) fp.set_preference("browser.download.dir", os.getcwd()) fp.set_preference("browser.helperApps.neverAsk.saveToDisk","application/x-targz") self.driver = webdriver.Firefox(firefox_profile=fp) self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver)
#描述:用例层代码,调用ipfilter_business import unittest, time from selenium import webdriver from login.login_business import LoginBusiness from firewall.ipfilter.ipfilter_business import IPFilterBusiness from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wirless = data.data_wireless() data_lan = data.data_lan() log = Log("IPFilter") class TestIPFilter(unittest.TestCase): """测试IP过滤的用例集(Duration:0.18h)""" def setUp(self): self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver) #调用实例的登录AP的web界面 Lg.login(data_basic['superUser'], data_basic['super_defalut_pwd']) #刷新页面重新登录ap页面 Lg.refresh_login_ap()
from selenium import webdriver from login.login_business import LoginBusiness from firewall.dmzsettings.dmzsettings_business import DMZSettingsBusiness from firewall.ipfilter.ipfilter_business import IPFilterBusiness from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from workmode.workmode_business import WorkModeBusiness from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wirless = data.data_wireless() data_lan = data.data_lan() data_wan = data.data_wan() log = Log("DMZSettings") class TestDMZSettings(unittest.TestCase): """测试DMZ的用例集(Duration:0.14h)""" def setUp(self): self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver) #调用实例的登录AP的web界面 Lg.login(data_basic['superUser'], data_basic['super_defalut_pwd']) #刷新页面重新登录ap页面 Lg.refresh_login_ap()
#coding=utf-8 #作者:曾祥卫 #时间:2018.05.03 #描述:Network-Clients用例集,调用clients_business import unittest, time, subprocess from access_points.aps_business import APSBusiness from system.settings.settings_business import SettingsBusiness from ssids.ssids_business import SSIDSBusiness from clients.clients_business import Clients_Business from access_control.access_list.accesslist_business import AccessListBusiness from data import data from connect.ssh import SSH from data.logfile import Log import requests log = Log("clients") data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_ng = data.data_networkgroup() data_ap = data.data_AP() data_client = data.data_Client() class TestClients(unittest.TestCase): u"""测试Network-Clients的用例集(runtime:1.45h)""" def setUp(self):
import unittest from selenium import webdriver from system_settings.maintenance.access.access_business import AccessBusiness from system_settings.maintenance.upgrade.upgrade_business import UpgradeBusiness from ssid.ssid_business import SSIDBusiness from setupwizard.setupwizard_business import SWBusiness from login.login_business import LoginBusiness from data import data from access_points.aps_business import APSBusiness from navbar.navbar_business import NavbarBusiness from connect.ssh import SSH from data.logfile import Log log = Log("Maintenance") data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_ng = data.data_networkgroup() data_AP = data.data_AP() class TestMaintenance(unittest.TestCase): u"""测试维护的用例集(runtime:4h)""" def setUp(self): # firefox_profile = webdriver.FirefoxProfile(data_basic['firefox_profile']) # self.driver = webdriver.Firefox(firefox_profile=firefox_profile) self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web'])
#时间:2018.07.11 #描述:cloud监控面板-概览用例集 import unittest, time from dashboard.overview.overview_business import OverViewBusiness from system.settings.settings_business import SettingsBusiness from dashboard.network_list.networklist_business import NetworkListBusiness from navbar.user.user_business import UserBusiness from dashboard.ap_list.allaplist_business import AllApListBusiness from access_points.aps_business import APSBusiness from ssids.ssids_business import SSIDSBusiness from data import data from data.logfile import Log import requests log = Log("dashboard") data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_ng = data.data_networkgroup() data_ap = data.data_AP() data_client = data.data_Client() class TestDashboard(unittest.TestCase): u"""测试监控面板(runtime:1.5h)""" def setUp(self): self.s = requests.session() tmp = NetworkListBusiness(self.s) #使用用户名密码,带着cookie登录cloud,并返回响应数据
import unittest, time from selenium import webdriver from login.login_business import LoginBusiness from network.wirelesssettings.wirelesssettings_business import WirelessSettingsBusiness from stateinfo.stateinfo_business import StateInfoBusiness from systemtools.configupdate.configupdate_business import ConfigUpdateBusiness from connect.ssh import SSH from data import data from data.logfile import Log data_basic = data.data_basic() data_login = data.data_login() data_wirless = data.data_wireless() log = Log("StateInfo") class TestStateInfo(unittest.TestCase): """测试状态信息的用例集(Duration:0.28h)""" def setUp(self): self.driver = webdriver.Firefox() self.driver.maximize_window() self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(20) #逻辑类对象,建一个实例 Lg = LoginBusiness(self.driver) #调用实例的登录AP的web界面 Lg.login(data_basic['superUser'], data_basic['super_defalut_pwd']) #刷新页面重新登录ap页面 Lg.refresh_login_ap()
#作者:曾祥卫 #时间:2018.05.31 #描述:Network-system-settings用例集,调用settings_business import unittest, time, subprocess from access_points.aps_business import APSBusiness from system.settings.settings_business import SettingsBusiness from ssids.ssids_business import SSIDSBusiness from clients.clients_business import Clients_Business from access_control.access_list.accesslist_business import AccessListBusiness from access_control.time_policy.timepolicy_business import TimePolicyBusiness from data import data from connect.ssh import SSH from data.logfile import Log import requests log = Log("settings") data_basic = data.data_basic() data_login = data.data_login() data_wireless = data.data_wireless() data_ng = data.data_networkgroup() data_ap = data.data_AP() data_client = data.data_Client() class TestSettings(unittest.TestCase): u"""测试Network-system-settings的用例集(runtime:1h)""" def setUp(self):