def _run(): prepare = _prepare() logger = manager.get_logger() reporter = manager.get_reporter() if not prepare: reporter.screenshot() logger.error("Connect to sdk fail,please config your game contain sdk or not in the first scene") return try: import testcase.runner as runner runner.run() except WeTestRuntimeError as e: stack = traceback.format_exc() logger.exception(stack)
def _run(): prepare = _prepare() logger = manager.get_logger() reporter = manager.get_reporter() if not prepare: reporter.screenshot() logger.error("Connect to sdk fail,please config your game contain sdk or not in the first scene") return try: import testcase.runner as runner runner.run() except WeTestRuntimeError as e: stack = traceback.format_exc() logger.exception(stack)
def run(): prepare = _prepare() logger = manager.get_logger() reporter = manager.get_reporter() if not prepare: reporter.screenshot() logger.error( "Connect to sdk fail,please config your game contain sdk or not in the first scene" ) return try: """此处添加当次测试的内容""" import testcase.runner as runner runner.run() # 根据不同测试场景需求,修改该部分内容。 import testcase.MyTestAPI as nsstest # 1. 登录游戏,选服,进入游戏大厅 nsstest.login() nsstest.select_section(34) nsstest.enter_gamecenter() #2. 开始单局,打桩标记 nsstest.random_start("ECGMT_PROP_SINGLE_GAME") cube_client.mark_tag() # 3.等待单局结束,打桩标记 nsstest.wait_until_end() cube_client.mark_tag() # 4.退出游戏 nsstest.exit_game() time.sleep(10) except WeTestRuntimeError as e: stack = traceback.format_exc() logger.exception(stack) finally: _cube_finish_test()