mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-06 23:11:21 +08:00
change cli: run_path
This commit is contained in:
@@ -73,7 +73,7 @@ def main_run(args):
|
|||||||
err_code = 0
|
err_code = 0
|
||||||
try:
|
try:
|
||||||
for path in args.testfile_paths:
|
for path in args.testfile_paths:
|
||||||
summary = runner.run(path, dot_env_path=args.dot_env_path)
|
summary = runner.run_path(path, dot_env_path=args.dot_env_path)
|
||||||
report_dir = args.report_dir or os.path.join(os.getcwd(), "reports")
|
report_dir = args.report_dir or os.path.join(os.getcwd(), "reports")
|
||||||
gen_html_report(
|
gen_html_report(
|
||||||
summary,
|
summary,
|
||||||
|
|||||||
@@ -223,6 +223,7 @@ class HttpRunner(object):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
# load tests
|
# load tests
|
||||||
|
logger.info(f"HttpRunner version: {__version__}")
|
||||||
self.exception_stage = "load tests"
|
self.exception_stage = "load tests"
|
||||||
tests_mapping = loader.load_cases(path, dot_env_path)
|
tests_mapping = loader.load_cases(path, dot_env_path)
|
||||||
|
|
||||||
@@ -245,7 +246,6 @@ class HttpRunner(object):
|
|||||||
dict: result summary
|
dict: result summary
|
||||||
|
|
||||||
"""
|
"""
|
||||||
logger.info(f"HttpRunner version: {__version__}")
|
|
||||||
if loader.is_test_path(path_or_tests):
|
if loader.is_test_path(path_or_tests):
|
||||||
return self.run_path(path_or_tests, dot_env_path, mapping)
|
return self.run_path(path_or_tests, dot_env_path, mapping)
|
||||||
elif loader.is_test_content(path_or_tests):
|
elif loader.is_test_content(path_or_tests):
|
||||||
|
|||||||
Reference in New Issue
Block a user