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()
예제 #2
0
 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()
예제 #4
0
 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()
예제 #5
0
 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())
예제 #6
0
 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()
예제 #8
0
 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()
예제 #10
0
 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()
예제 #11
0
 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()
예제 #12
0
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  # 返回響應碼,内容
예제 #13
0
 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()
예제 #14
0
 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()
예제 #19
0
 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()
예제 #20
0
 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()
예제 #22
0
 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())
예제 #23
0
 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()
예제 #26
0
 def __init__(self):
     self.portal = Portal_api()  # 實作API
     self.config = systemSetting()  # 系統參數
예제 #27
0
파일: runAll.py 프로젝트: eos1209/auto_test
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)
예제 #28
0
 def setUp(self):
     self.config = systemSetting()  # 系統參數
     self.__http = HttpRequest()
     self.user = User(self.__http)
     self.betRecordHistory = reports.BetRecordHistory(self.__http)
     self.user.login()
예제 #29
0
    def __init__(self):

        self.Cookies = {}
        self.config = systemSetting()  # 參數設定
예제 #30
0
 def __init__(self):
     self.config = systemSetting()  # 系統參數
     self.__http = HttpRequest()
     self.user = User(self.__http)
     self.user.login()
     self.home = Home.Home(self.__http)