How to use _run_test_task method in lisa

Best Python code snippet using lisa_python

mx_sulong_gate.py

Source:mx_sulong_gate.py Github

copy

Full Screen

...90 return '{description}({junit_prefix}{testClasses})'.format(description=description,91 junit_prefix=junit_prefix,92 testClasses=', '.join((_reduce_package_prefix(cls) for cls in testClasses)))93 description = _sulong_gate_format_description(testClasses, description=description)94 def _run_test_task(tasks):95 with Task('Test' + title, tasks, tags=tags + run_tags, description=description) as t:96 if t: mx_sulong_suite_constituents.run(unittestArgs, testClasses)97 build_task = TestSuiteBuildTask(test_suite, tags + build_tags, args.extra_build_args)98 if build_task in self.build_tasks:99 self.build_tasks[self.build_tasks.index(build_task)].merge(build_task)100 else:101 self.build_tasks.append(build_task)102 self.test_tasks.append(_run_test_task)103 def execute(self, tasks):104 for build_task in self.build_tasks:105 build_task.execute(tasks)106 for test_task in self.test_tasks:107 test_task(tasks)108_sulongTestConfigRoot = os.path.join(_suite.dir, "tests", "configs")...

Full Screen

Full Screen

runner.py

Source:runner.py Github

copy

Full Screen

...51 self.retry_strategy = retry_strategy52 self.timeout = timeout53 self.parallel = parallel54 self.test_recorder.start_time = time()55 self._run_test_task()56 self.test_recorder.end_time = time()57 self.test_recorder.calculate_test_result()58 if self.test_recorder.total_count != self.test_recorder.pass_count and self.retry_strategy == RetryStrategy.RERUN_LAST:59 self._run_test_task()60 self.test_recorder.end_time = time()61 self.test_recorder.calculate_test_result()62 self.test_recorder.gen_test_report()63 def _run_test_task(self):64 """65 执行测试任务66 :return:67 """68 with ThreadPoolExecutor(max_workers=self.parallel) as executor:69 futures = list()70 stop_event = Event()71 for test_case in self.test_task.test_cases:72 if test_case.result != TestCaseResult.PASS:73 futures.append(executor.submit(self._run_test_case, test_case, stop_event))74 wait(futures, return_when=FIRST_EXCEPTION) # 第一次抛出异常时返回结果75 def _run_test_case(self, test_case: TestCase, stop_event: Event):76 """77 执行测试用例...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run lisa automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful