Commit fd6eab48 authored by liguangyu06's avatar liguangyu06
Browse files

用例优化

parent 5aa33877
...@@ -38,7 +38,7 @@ strsQuery = result["data"]["list"][super_random]["productCode"] ...@@ -38,7 +38,7 @@ strsQuery = result["data"]["list"][super_random]["productCode"]
# 第三步超发配置导出 # 第三步超发配置导出
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url9") url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url9")
request_body = commonFuc().get_business_data(module, "payload9", strsQuery) request_body = commonFuc().get_business_data(module, "payload9")
""" """
...@@ -63,13 +63,13 @@ with open(file_path, 'wb') as f: ...@@ -63,13 +63,13 @@ with open(file_path, 'wb') as f:
# 获取导出文件中商品编码 # 获取导出文件中商品编码
excel = HandleExcel(file_path, "Sheet1") excel = HandleExcel(file_path, "Sheet1")
# print(excel.read_data()) # print(excel.read_data())
result = {"strsQuery": excel.read_data()[0].get("商品编码")} result = {"materialCode": excel.read_data()[0].get("物料编码")}
# 将接口响应时间添加至结果中 # 将接口响应时间添加至结果中
result["api_time"] = api_time result["api_time"] = api_time
# 获取预期结果 # 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict9", strsQuery) check_dict = commonFuc().get_business_data(module, "checkDict9")
# print(check_dict) # print(check_dict)
# 断言实际结果中是否包含预期结果的内容 # 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result) commonFuc().check_result(check_dict, result)
......
...@@ -93,9 +93,9 @@ checkDict8: {"strsQuery":"%s"} ...@@ -93,9 +93,9 @@ checkDict8: {"strsQuery":"%s"}
#测试场景9:超发配置导出功能验证 #测试场景9:超发配置导出功能验证
"url9": "/order/public/exportstockPurchaseExcel" "url9": "/order/public/exportstockPurchaseExcel"
"payload9": {"strsQuery":"%s","materialCode":"","productLineCode":""} "payload9": {"strsQuery":"","materialCode":"507677","productLineCode":""}
#预期结果 #预期结果
checkDict9: {"strsQuery":"%s"} checkDict9: {"materialCode":"507677"}
#测试场景13:超发配置导入日志记录验证 #测试场景13:超发配置导入日志记录验证
"url13": "/order/public/excelLog/list?sheetName=supernova-D&pageStart=1&pageSize=10&total=" "url13": "/order/public/excelLog/list?sheetName=supernova-D&pageStart=1&pageSize=10&total="
......
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