mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
feat: save testcase HRUN-Request-ID in summary.json
This commit is contained in:
@@ -201,6 +201,7 @@ class HttpRunner(object):
|
|||||||
)
|
)
|
||||||
testcase_summary["log"] = logs_file_abs_path
|
testcase_summary["log"] = logs_file_abs_path
|
||||||
|
|
||||||
|
testcase_summary["HRUN-Request-ID"] = testcase.runner.hrun_request_id
|
||||||
summary["details"].append(testcase_summary)
|
summary["details"].append(testcase_summary)
|
||||||
|
|
||||||
return summary
|
return summary
|
||||||
|
|||||||
@@ -75,6 +75,8 @@ class Runner(object):
|
|||||||
self.hrun_request_id = str(uuid.uuid4())
|
self.hrun_request_id = str(uuid.uuid4())
|
||||||
if "HRUN-Request-ID" not in config_variables:
|
if "HRUN-Request-ID" not in config_variables:
|
||||||
config_variables["HRUN-Request-ID"] = self.hrun_request_id
|
config_variables["HRUN-Request-ID"] = self.hrun_request_id
|
||||||
|
else:
|
||||||
|
self.hrun_request_id = config_variables["HRUN-Request-ID"]
|
||||||
|
|
||||||
# testcase setup hooks
|
# testcase setup hooks
|
||||||
testcase_setup_hooks = config.get("setup_hooks", [])
|
testcase_setup_hooks = config.get("setup_hooks", [])
|
||||||
|
|||||||
Reference in New Issue
Block a user