From 4e9e17c4d77e9fdd58f6079b1d2506ca4aa9d38a Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 23 Apr 2020 16:07:55 +0800 Subject: [PATCH] change: remove total_response_time --- httprunner/report/stringify.py | 17 ----------------- httprunner/v3/schema.py | 1 - 2 files changed, 18 deletions(-) diff --git a/httprunner/report/stringify.py b/httprunner/report/stringify.py index 88bb4406..8fd50ad3 100644 --- a/httprunner/report/stringify.py +++ b/httprunner/report/stringify.py @@ -144,21 +144,6 @@ def __stringify_response(response_data): response_data[key] = value -def __get_total_response_time(step_datas: List[SessionData]): - """ caculate total response time of all step_datas - """ - try: - response_time = 0 - for step_data in step_datas: - response_time += step_data.stat.response_time_ms - - return "{:.2f}".format(response_time) - - except TypeError: - # failure exists - return "N/A" - - def stringify_summary(testsuite_summary: TestSuiteSummary): """ stringify summary, in order to dump json file and generate html report. """ @@ -173,5 +158,3 @@ def stringify_summary(testsuite_summary: TestSuiteSummary): for req_resp in req_resp_list: __stringify_request(req_resp["request"]) __stringify_response(req_resp["response"]) - - testcase_summary.total_response_time = __get_total_response_time(step_datas) diff --git a/httprunner/v3/schema.py b/httprunner/v3/schema.py index 96cc8aea..11474260 100644 --- a/httprunner/v3/schema.py +++ b/httprunner/v3/schema.py @@ -115,7 +115,6 @@ class TestCaseSummary(BaseModel): in_out: TestCaseInOut = {} log: Text = "" step_datas: List[SessionData] = [] - total_response_time: Text = "N/A" class PlatformInfo(BaseModel):