mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
bugfix: display default test suite name if not specified
This commit is contained in:
@@ -90,7 +90,9 @@ def render_html_report(summary, html_report_name=None, html_report_template=None
|
|||||||
if not os.path.isdir(report_dir_path):
|
if not os.path.isdir(report_dir_path):
|
||||||
os.makedirs(report_dir_path)
|
os.makedirs(report_dir_path)
|
||||||
|
|
||||||
for suite_summary in summary["details"]:
|
for index, suite_summary in enumerate(summary["details"]):
|
||||||
|
if not suite_summary.get("name"):
|
||||||
|
suite_summary["name"] = "test suite {}".format(index)
|
||||||
for record in suite_summary.get("records"):
|
for record in suite_summary.get("records"):
|
||||||
meta_data = record['meta_data']
|
meta_data = record['meta_data']
|
||||||
stringify_data(meta_data, 'request')
|
stringify_data(meta_data, 'request')
|
||||||
|
|||||||
Reference in New Issue
Block a user