Commit 1af763ee authored by liguangyu06's avatar liguangyu06
Browse files

增加响应时间获取

parent f0682f22
......@@ -65,6 +65,8 @@ url3 = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url82"
request_body3 = commonFuc().get_business_data(module, "payload82", demand_id, demand_code)
# 发送请求
result3 = requests.post(url3, json=request_body3, headers=headers)
# 获取接口响应时间
api_time = result3.elapsed.total_seconds()
result3 = json.loads(result3.content)
# print(result3)
# 获取预期结果
......
......@@ -65,6 +65,8 @@ url3 = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url81"
request_body3 = commonFuc().get_business_data(module, "payload81", demand_id, demand_code)
# 发送请求
result3 = requests.post(url3, json=request_body3, headers=headers)
# 获取接口响应时间
api_time = result3.elapsed.total_seconds()
result3 = json.loads(result3.content)
# print(result3)
# 获取预期结果
......
......@@ -59,11 +59,13 @@ commonFuc().check_result(check_dict2, result2)
demand_id = result2["data"]["list"][0]["demandId"]
# print(demand_id)
# 步骤五对新创建的需求单订单进行删除操作
# 步骤五对新创建的需求单订单进行审核拒绝操作
url3 = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url6")
request_body3 = commonFuc().get_business_data(module, "payload6", demand_id)
# 发送请求
result3 = requests.post(url3, json=request_body3, headers=headers)
# 获取接口响应时间
api_time = result3.elapsed.total_seconds()
result3 = json.loads(result3.content)
# print(result3)
# 获取预期结果
......
......@@ -76,6 +76,8 @@ request_body5 = commonFuc().get_business_data(module, "payload84", demand_id)
# 发送请求
result5 = requests.post(url5, json=request_body5, headers=headers)
# 获取接口响应时间
api_time = result5.elapsed.total_seconds()
result5 = json.loads(result5.content)
# print(result5)
if result5["code"] == "200":
......
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