(args)
| 522 | |
| 523 | |
| 524 | def main(args): |
| 525 | runner = TimeCostTextTestRunner() |
| 526 | if args.suites is not None and len(args.suites) > 0: |
| 527 | logger.info('Running: %s' % ' '.join(args.suites)) |
| 528 | test_suite = gather_test_suites_in_files(args.test_dir, args.suites, args.list_tests) |
| 529 | else: |
| 530 | test_suite = gather_test_cases(os.path.abspath(args.test_dir), args.pattern, args.list_tests) |
| 531 | if not args.list_tests: |
| 532 | result = runner.run(test_suite) |
| 533 | logger.info('Running case completed, pid: %s, suites: %s' % (os.getpid(), args.suites)) |
| 534 | result = collect_test_results(result) |
| 535 | df = test_cases_result_to_df(result) |
| 536 | if args.result_dir is not None: |
| 537 | save_test_result(df, args) |
| 538 | else: |
| 539 | print_table_result(df) |
| 540 | print_abnormal_case_info(df) |
| 541 | statistics_test_result(df) |
| 542 | |
| 543 | |
| 544 | if __name__ == '__main__': |
no test coverage detected