mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-09 06:23:52 +08:00
fix: convert har to JSON format testcase
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
**Fixed**
|
**Fixed**
|
||||||
|
|
||||||
- fix: avoid '.csv' been converted to '_csv'
|
- fix: avoid '.csv' been converted to '_csv'
|
||||||
|
- fix: convert har to JSON format testcase
|
||||||
|
|
||||||
## 3.0.12 (2020-06-14)
|
## 3.0.12 (2020-06-14)
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ def main_har2case(args):
|
|||||||
|
|
||||||
if args.to_yaml:
|
if args.to_yaml:
|
||||||
output_file_type = "YAML"
|
output_file_type = "YAML"
|
||||||
elif args.to_yaml:
|
elif args.to_json:
|
||||||
output_file_type = "JSON"
|
output_file_type = "JSON"
|
||||||
else:
|
else:
|
||||||
output_file_type = "pytest"
|
output_file_type = "pytest"
|
||||||
|
|||||||
@@ -338,8 +338,6 @@ class HarParser(object):
|
|||||||
capture_exception(ex)
|
capture_exception(ex)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
logger.debug("prepared testcase: {}".format(testcase))
|
|
||||||
|
|
||||||
if file_type == "JSON":
|
if file_type == "JSON":
|
||||||
output_testcase_file = f"{harfile}.json"
|
output_testcase_file = f"{harfile}.json"
|
||||||
utils.dump_json(testcase, output_testcase_file)
|
utils.dump_json(testcase, output_testcase_file)
|
||||||
|
|||||||
Reference in New Issue
Block a user