mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-18 15:47:35 +08:00
Save loaded tests and parsed tests to JSON file.
This commit is contained in:
@@ -45,6 +45,9 @@ def main_hrun():
|
||||
parser.add_argument(
|
||||
'--failfast', action='store_true', default=False,
|
||||
help="Stop the test run on the first error or failure.")
|
||||
parser.add_argument(
|
||||
'--save-tests', action='store_true', default=False,
|
||||
help="Save loaded tests and parsed tests to JSON file.")
|
||||
parser.add_argument(
|
||||
'--startproject',
|
||||
help="Specify new project name.")
|
||||
@@ -80,7 +83,11 @@ def main_hrun():
|
||||
for path in args.testcase_paths:
|
||||
try:
|
||||
runner = HttpRunner(failfast=args.failfast)
|
||||
runner.run(path, dot_env_path=args.dot_env_path)
|
||||
runner.run(
|
||||
path,
|
||||
dot_env_path=args.dot_env_path,
|
||||
save_tests=args.save_tests
|
||||
)
|
||||
except Exception:
|
||||
logger.log_error("!!!!!!!!!! exception stage: {} !!!!!!!!!!".format(runner.exception_stage))
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user