fix: convert har to JSON format testcase

This commit is contained in:
debugtalk
2020-06-15 15:34:29 +08:00
parent 38364e8960
commit 1cf9e10189
3 changed files with 2 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
**Fixed**
- fix: avoid '.csv' been converted to '_csv'
- fix: convert har to JSON format testcase
## 3.0.12 (2020-06-14)

View File

@@ -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"

View File

@@ -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)