def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.memberSearch = member_and_agent.MemberSearch(self.__http) self.memberDeposit = member_and_agent.MemberDeposit(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.home = Home(self.__http) self.siteParameter = JackPotActivity(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.registerCopyWriting = PortalManagement.RegisterCopywriting(self.__http) self.PortalManagement = PortalManagement(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 參數設定 self.__http = HttpRequest() self.user = User(self.__http) self.redEnvelopeManagement = ActivityManagement.RedEnvelopeManagement(self.__http) self.user.login() self.portal = Portal_test()
def __init__(self): self.config = systemSetting() # 參數設定 path = "D:/chromedriver.exe" self.chrome_Path = os.path.abspath(path) self.driver = webdriver.Chrome(self.chrome_Path) self.windowSize = self.driver.maximize_window() self.link = self.driver.get(self.config.Portal_config())
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.memberTransaction = account_management.MemberTransaction( self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.timeLimitedEvent = ActivityManagement.TimeLimitedEvent( self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.home = Home(self.__http) self.siteParameter = retentionListUsers(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.home = Home(self.__http) self.siteParameter = SmsMerchantManagement(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.siteParameter = PortalManagement.MobileMenu(self.__http) self.PortalManagement = PortalManagement(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.slideShow = PortalManagement.SlideShow(self.__http) self.PortalManagement = PortalManagement(self.__http) self.user.login()
def send_post_Portal_request(path, payload, Headers, cookies): config = systemSetting() base_url = config.Portal_config() + path r = requests.post(base_url, json=payload, headers=Headers, cookies=cookies) status_code = r.status_code # 獲取返回狀態碼 response_text = r.json() return str(status_code), response_text, r.cookies # 返回響應碼,内容
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.PortalManagement = system_management.PortalManagement(self.__http) self.portalSetting = system_management.PortalSetting(self.__http) self.user.login()
def setUp(self) -> None: self.http = Agent_Http() self.cookie = agent_login() self.config = systemSetting() self.beginDay = betRecord_start() self.endDay = get_todaynow() self.info = connectionId()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.AnnouncementManagement = PortalManagement.AnnouncementManagement(self.__http) self.PortalManagement = PortalManagement(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.newLuckyWheel = ActivityManagement.NewLuckyWheel(self.__http) self.PortalManagement = PortalManagement(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.discount = account_management.Discount(self.__http) self.PortalManagement = PortalManagement(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.agentDetail = member_and_agent.AgentDetail(self.__http) self.AgentSearch = member_and_agent.AgentSearch(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.home = Home(self.__http) self.siteParameter = GPKRewardRecords(self.__http) self.PortalManagement = PortalManagement(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.memberSearch = member_and_agent.MemberSearch(self.__http) # 會員搜尋 self.memberDetail = member_and_agent.MemberDetail(self.__http) # 會員詳細 self.memberTags = member_and_agent.MemberTags(self.__http) # 會員標籤 self.home = Home(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.memberDetail = member_and_agent.MemberDetail(self.__http) self.searchMember = member_and_agent.MemberSearch(self.__http) self.deposit = member_and_agent.MemberDeposit(self.__http) self.withDraw = member_and_agent.MemberWithdraw(self.__http) self.AgentDetail = member_and_agent.AgentDetail(self.__http) self.user.login()
def __init__(self): self.config = systemSetting() # 參數設定 path = "D:/chromedriver.exe" self.chrome_Path = os.path.abspath(path) option = webdriver.ChromeOptions() mobile_emulation = {"deviceName": "iPhone X"} option.add_experimental_option('mobileEmulation', mobile_emulation) self.driver = webdriver.Chrome(self.chrome_Path, chrome_options=option) self.windowSize = self.driver.maximize_window() self.link = self.driver.get(self.config.Mobile_config())
def getWebsiteId(cls): cls.config = systemSetting() cls.__http = HttpRequest() cls.user = User(cls.__http) cls.AnnouncementManagement = PortalManagement.AnnouncementManagement( cls.__http) cls.PortalManagement = PortalManagement(cls.__http) cls.user.login() response_data = cls.PortalManagement.getWebsiteList({}) for i in range(len(response_data[1]['ReturnObject'])): if cls.config.siteName_config( ) == response_data[1]['ReturnObject'][i]['Name']: Id = response_data[1]['ReturnObject'][i]['Id'] return Id
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.missionReward = ActivityManagement.MissionReward(self.__http) self.user.login()
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.siteParameter = account_management.ThirdPartyPayment(self.__http) self.user.login()
def __init__(self): self.portal = Portal_api() # 實作API self.config = systemSetting() # 系統參數
print(case_path) def all_case(): discover = unittest.defaultTestLoader.discover(case_path, pattern="test*.py", top_level_dir=None) return discover # # loader = unittest.TestLoader() # suite = loader.discover("./case/test_api") title = systemSetting() # 報表選擇站台標題 now = time.strftime("%Y-%m-%d %H-%M-%S", time.localtime()) # 確定生成報告的路徑 filePath = "./test_reports/" + now + "-Test_Result.html" fp = open(filePath, 'wb') # 設定 setting = { "stream": fp, "title": 'API[' + title.report_title() + ']-自動化測試報告', # description=None "tester": '格明 - QA Team' } # 生成報告 runner = HTMLTestReportCN.HTMLTestRunner(**setting)
def setUp(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.betRecordHistory = reports.BetRecordHistory(self.__http) self.user.login()
def __init__(self): self.Cookies = {} self.config = systemSetting() # 參數設定
def __init__(self): self.config = systemSetting() # 系統參數 self.__http = HttpRequest() self.user = User(self.__http) self.user.login() self.home = Home.Home(self.__http)