Commit ab0227b6 authored by liguangyu06's avatar liguangyu06
Browse files

增加响应时间获取

parent a0887366
...@@ -33,6 +33,8 @@ request_body = commonFuc().get_business_data(module, "payload1") ...@@ -33,6 +33,8 @@ request_body = commonFuc().get_business_data(module, "payload1")
""" """
# 发送请求 # 发送请求
result = requests.post(url, json=request_body, headers=headers) result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
api_time = result.elapsed.total_seconds()
result = json.loads(result.content) result = json.loads(result.content)
# print(result) # print(result)
# 获取预期结果 # 获取预期结果
......
...@@ -33,6 +33,8 @@ request_body = commonFuc().get_business_data(module, "payload2") ...@@ -33,6 +33,8 @@ request_body = commonFuc().get_business_data(module, "payload2")
# 发送请求 # 发送请求
result = requests.post(url, json=request_body, headers=headers) result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
api_time = result.elapsed.total_seconds()
result = json.loads(result.content) result = json.loads(result.content)
# print(result) # print(result)
# 获取预期结果 # 获取预期结果
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment