Commit 58eb0321 authored by liguangyu06's avatar liguangyu06
Browse files

优化

parent 2db417b4
......@@ -43,7 +43,7 @@ request_body = commonFuc().get_business_data(module, "payload63", batchNumber, c
场景: 批次号无效_通过批号获取上报数据
用例名称:批次号无效_通过批号获取上报数据
输出:{"errList":"客户编码:%s生产批号:%s不存在或已上报"}
输出:{"message":"生产批号:%s 不存在或已上报"}
"""
# 发送请求
......@@ -51,14 +51,12 @@ result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
api_time = float(result.elapsed.total_seconds())
# 获取接口返回信息
result = json.loads(result.content)
result = {"errList": result["data"]["errList"][0]}
# 将接口响应时间添加至result
result = json.loads(result.content)
result["api_time"] = api_time
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict63", customerCode, batchNumber)
check_dict = commonFuc().get_business_data(module, "checkDict63_1", batchNumber)
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
......@@ -429,6 +429,7 @@ checkDict64: {"success":false,"code":"ERROR","message":"第1行上报植入数
"payload63": {"productLineCode":"","reportVoExcelList":[{"batchNumber":"%s","customerCode":"%s"}]}
#预期结果
checkDict63: {"errList":"客户编码:%s生产批号:%s不存在或已上报"}
checkDict63_1: {"message":"生产批号:%s 不存在或已上报"}
#测试场景65:通过批次号获取上报数据验证
"url65": "/order/public/getBackReport"
......
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