mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-17 18:17:36 +08:00
fix: convert har to JSON format testcase
This commit is contained in:
@@ -67,7 +67,7 @@ def main_har2case(args):
|
||||
|
||||
if args.to_yaml:
|
||||
output_file_type = "YAML"
|
||||
elif args.to_yaml:
|
||||
elif args.to_json:
|
||||
output_file_type = "JSON"
|
||||
else:
|
||||
output_file_type = "pytest"
|
||||
|
||||
@@ -338,8 +338,6 @@ class HarParser(object):
|
||||
capture_exception(ex)
|
||||
raise
|
||||
|
||||
logger.debug("prepared testcase: {}".format(testcase))
|
||||
|
||||
if file_type == "JSON":
|
||||
output_testcase_file = f"{harfile}.json"
|
||||
utils.dump_json(testcase, output_testcase_file)
|
||||
|
||||
Reference in New Issue
Block a user