def run_method_H5(driver_name, sheetN): total_count = [] # 总数 data = Getda(sheetN) server = Serappium() server.main() # 启动appium服务 action_method = ActionMeSelenium(driver_name, sheetN) caselines = data.get_case_lines() start = datetime.datetime.now() print("------------start time used---------------:", start) for i in range(1, caselines): is_run = data.get_is_run(i) if is_run is True: handle_step = data.get_handle_step(i) # 执行方法 handle_value = data.get_handle_value(i) # 操作值 # 自动化测试用例集执行 excute_method = getattr(action_method, handle_step) print( '-------------------------执行到行数-------------------------', i) time.sleep(2) excute_method(i, handle_value) action_method.ScreenShot(i, handle_value, file_s='../Image/H5_img/执行图片/') total_count.append(i) end = datetime.datetime.now() print("------------Time used---------------:", end - start) total = len(total_count) return total
def Run_Thread_Sport_Android(self): """ 体育项目 体育对投 多进程 :return: """ server = Serappium() server.main() # 启动appium服务 Run_threads = [ multiprocessing.Process(target=self.Run_BB_Android), # multiprocessing.Process(target=self.Run_Sport_Android2) ] for run_t in Run_threads: run_t.start()
def Run_Thread_BB_H5Android(self): """ BB项目 Android H5 多进程 :return: """ server = Serappium() server.main() # 启动appium服务 Run_threads = [ multiprocessing.Process(target=self.Run_BB_Android), multiprocessing.Process(target=self.Run_BB_H5) ] for run_t in Run_threads: run_t.start()
体育项目 体育对投 多进程 :return: """ server = Serappium() server.main() # 启动appium服务 Run_threads = [ multiprocessing.Process(target=self.Run_BB_Android), # multiprocessing.Process(target=self.Run_Sport_Android2) ] for run_t in Run_threads: run_t.start() def run_All(self): Run_threads = [ multiprocessing.Process(target=self.Run_Thread_Sport_Android), multiprocessing.Process(target=self.Run_Thread_BB_H5Android) ] for run_t in Run_threads: run_t.start() run_t.join() if __name__ == '__main__': c = AllThread() server = Serappium() server.main() # 启动appium服务 c.Run_Thread_Sport_Android()