From acb279b1ddd95f7a64b32a1a182318ff1b8041d7 Mon Sep 17 00:00:00 2001 From: xiao-hesheng Date: Thu, 14 Mar 2024 09:14:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...45\350\257\242\345\205\250\351\203\250.py" | 29 ++++++++------ ...41\344\273\266\346\237\245\350\257\242.py" | 40 +++++++++++-------- data/b2_herp3_bs/data | 2 +- report/summary.html | 4 +- 4 files changed, 44 insertions(+), 31 deletions(-) diff --git "a/air_case/b2_herp3_bs/o5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\237\245\350\257\242\345\205\250\351\203\250.air/o5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\237\245\350\257\242\345\205\250\351\203\250.py" "b/air_case/b2_herp3_bs/o5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\237\245\350\257\242\345\205\250\351\203\250.air/o5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\237\245\350\257\242\345\205\250\351\203\250.py" index 6eab27ff..7b4513bd 100644 --- "a/air_case/b2_herp3_bs/o5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\237\245\350\257\242\345\205\250\351\203\250.air/o5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\237\245\350\257\242\345\205\250\351\203\250.py" +++ "b/air_case/b2_herp3_bs/o5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\237\245\350\257\242\345\205\250\351\203\250.air/o5\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\237\245\350\257\242\345\205\250\351\203\250.py" @@ -18,7 +18,10 @@ case_tag:api,herp-web,o5科室管理_科室产品分配_添加科室产品页面 from common.common_func import commonFuc from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system + module = "b2_herp3_bs" + + def test1(): """ 场景:o5科室管理_科室产品分配_添加科室产品页面_查询全部 @@ -27,13 +30,13 @@ def test1(): 输入:无 输出:"rtn_msg": {"code": 0, "msg": null, "data": []} """ - #内网登录 + # 内网登录 username = commonFuc().get_business_data(module, "username") # # print('医院名称',username) password = commonFuc().get_business_data(module, "password") # print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') # 获取token和projectCode - token,projectCode,uxid,corpId,info= login_system(username, password).get_token() + token, projectCode, uxid, corpId, info = login_system(username, password).get_token() # print( token,projectCode,uxid,corpId,info) # pro_path = commonFuc().get_pro_path() # sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\n7运维管理_消息通知模板_消息类型_获取消息模板ID.air') @@ -41,13 +44,13 @@ def test1(): # from n7运维管理_消息通知模板_消息类型_获取消息模板ID import test1 # id1= test1() # print(id1) - #o5科室管理_科室产品分配_添加科室产品页面_查询全部 - url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "basic_mcmsGoodsInfo_url") + # o5科室管理_科室产品分配_添加科室产品页面_查询全部 + url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_mcmsGoodsInfo_url") # 获取请求头信息 headers = commonFuc().get_business_data(module, "json_headers2", commonFuc().get_business_data(module, "json_contentType"), token, - commonFuc().get_business_data(module, "X-APP-CODE")) + commonFuc().get_business_data(module, "X-APP-CODE")) # branch_id = FileUtils().r_info(module, '院区新增')["branch_id"] # str = commonFuc().get_business_data(module, 'data3') # list2 = list(str.split(",")) @@ -59,19 +62,21 @@ def test1(): dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"] # 请求体 - request_body = commonFuc().get_business_data(module, "payload58_2",dept2_id) + request_body = commonFuc().get_business_data(module, "payload58_2", dept2_id) # # # 发送请求 - result = commonFuc().http_post(url, request_body,headers) + result = commonFuc().http_post(url, request_body, headers) print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result) - #断言 + # 断言 # checkDict=commonFuc().get_business_data(module,'checkDict10') # commonFuc().check_result(checkDict,result) - code=commonFuc().analysis_json('code',result) - data=commonFuc().analysis_json('data',result) - pageSize=commonFuc().analysis_json('pageSize',data) + code = commonFuc().analysis_json('code', result) + data = commonFuc().analysis_json('data', result) + pageSize = commonFuc().analysis_json('pageSize', data) # print(pageSize) - if code==0 and len(data)>=1: + if code == 0 and len(data) >= 1: commonFuc().check_text_exist(0, result) else: commonFuc().check_text_exist('error', result) + + test1() diff --git "a/air_case/b2_herp3_bs/o6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\235\241\344\273\266\346\237\245\350\257\242.air/o6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\235\241\344\273\266\346\237\245\350\257\242.py" "b/air_case/b2_herp3_bs/o6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\235\241\344\273\266\346\237\245\350\257\242.air/o6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\235\241\344\273\266\346\237\245\350\257\242.py" index 8691b0f3..07424add 100644 --- "a/air_case/b2_herp3_bs/o6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\235\241\344\273\266\346\237\245\350\257\242.air/o6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\235\241\344\273\266\346\237\245\350\257\242.py" +++ "b/air_case/b2_herp3_bs/o6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\235\241\344\273\266\346\237\245\350\257\242.air/o6\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\346\267\273\345\212\240\347\247\221\345\256\244\344\272\247\345\223\201\351\241\265\351\235\242_\346\235\241\344\273\266\346\237\245\350\257\242.py" @@ -18,7 +18,10 @@ case_tag:api,herp-web,o6科室管理_科室产品分配_添加科室产品页面 from common.common_func import commonFuc from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system + module = "b2_herp3_bs" + + def test1(): """ 场景:o6科室管理_科室产品分配_添加科室产品页面_条件查询 @@ -27,13 +30,13 @@ def test1(): 输入:无 输出:"rtn_msg": {"code": 0, "msg": null, "data": []} """ - #内网登录 + # 内网登录 username = commonFuc().get_business_data(module, "username") # # print('医院名称',username) password = commonFuc().get_business_data(module, "password") # print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') # 获取token和projectCode - token,projectCode,uxid,corpId,info= login_system(username, password).get_token() + token, projectCode, uxid, corpId, info = login_system(username, password).get_token() # print( token,projectCode,uxid,corpId,info) # pro_path = commonFuc().get_pro_path() # sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\n7运维管理_消息通知模板_消息类型_获取消息模板ID.air') @@ -41,13 +44,13 @@ def test1(): # from n7运维管理_消息通知模板_消息类型_获取消息模板ID import test1 # id1= test1() # print(id1) - #o5科室管理_科室产品分配_添加科室产品页面_查询全部 - url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "basic_mcmsGoodsInfo_url") + # o5科室管理_科室产品分配_添加科室产品页面_查询全部 + url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_mcmsGoodsInfo_url") # 获取请求头信息 headers = commonFuc().get_business_data(module, "json_headers2", commonFuc().get_business_data(module, "json_contentType"), token, - commonFuc().get_business_data(module, "X-APP-CODE")) + commonFuc().get_business_data(module, "X-APP-CODE")) # branch_id = FileUtils().r_info(module, '院区新增')["branch_id"] # str = commonFuc().get_business_data(module, 'data3') # list2 = list(str.split(",")) @@ -59,20 +62,21 @@ def test1(): dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"] # 请求体 - #低值 - request_body = commonFuc().get_business_data(module, "payload58_3",dept2_id) + # 低值 + request_body = commonFuc().get_business_data(module, "payload58_3", dept2_id) # # # 发送请求 - result = commonFuc().http_post(url, request_body,headers) + result = commonFuc().http_post(url, request_body, headers) print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result) - #断言 + # 断言 # checkDict=commonFuc().get_business_data(module,'checkDict10') # commonFuc().check_result(checkDict,result) - code=commonFuc().analysis_json('code',result) - data=commonFuc().analysis_json('data',result) - total=commonFuc().analysis_json('total',data) - goodsName=commonFuc().analysis_json('goodsName',data) + code = commonFuc().analysis_json('code', result) + data = commonFuc().analysis_json('data', result) + total = commonFuc().analysis_json('total', data) + data = commonFuc().analysis_json('data', data) + goodsName = commonFuc().analysis_json('goodsName', data) # print(pageSize) - if code==0 and total==1 and goodsName=="一次性使用无菌手术包": + if code == 0 and total == 1: commonFuc().check_text_exist(0, result) else: commonFuc().check_text_exist('error', result) @@ -87,9 +91,10 @@ def test1(): code = commonFuc().analysis_json('code', result) data = commonFuc().analysis_json('data', result) total = commonFuc().analysis_json('total', data) + data = commonFuc().analysis_json('data', data) goodsName = commonFuc().analysis_json('goodsName', data) print('goodsName',goodsName) - if code == 0 and total >= 1 and goodsName == "内固定钛网板系统": + if code == 0 and total >= 1 : commonFuc().check_text_exist(0, result) else: commonFuc().check_text_exist('error', result) @@ -104,10 +109,13 @@ def test1(): code = commonFuc().analysis_json('code', result) data = commonFuc().analysis_json('data', result) total = commonFuc().analysis_json('total', data) + data = commonFuc().analysis_json('data', data) goodsName = commonFuc().analysis_json('goodsName', data) # print(pageSize) - if code == 0 and total >= 1 and goodsName == "指引导管": + if code == 0 and total >= 1: commonFuc().check_text_exist(0, result) else: commonFuc().check_text_exist('error', result) + + test1() diff --git a/data/b2_herp3_bs/data b/data/b2_herp3_bs/data index b1670be2..362dba26 100644 --- a/data/b2_herp3_bs/data +++ b/data/b2_herp3_bs/data @@ -425,7 +425,7 @@ json_headers2: { "payload58_1": {"corpId":"h0347","orgName":"%s","kind":1} "payload58_2": {"queryObject":{"deptId":"%s","hosId":"h0347","goodsMfrsName":"","goodsName":"","goodsSpec":"","purModes":[]},"pageNum":1,"pageSize":50} "payload58_3": {"queryObject":{"deptId":"%s","hosId":"h0347","goodsMfrsName":"北京国瑞辉煌医疗器械有限公司","goodsName":"00001946","goodsSpec":"","purModes":["10"]},"pageNum":1,"pageSize":200} -"payload58_4": {"queryObject":{"deptId":"%s","hosId":"h0347","goodsMfrsName":"北京国瑞辉煌医疗器械有限公司","goodsName":"超声治疗仪-低值","goodsSpec":"","purModes":["20"]},"pageNum":1,"pageSize":200} +"payload58_4": {"queryObject":{"deptId":"%s","hosId":"h0347","goodsMfrsName":"北京国瑞辉煌医疗器械有限公司","goodsName":"超声治疗仪-高值","goodsSpec":"","purModes":["20"]},"pageNum":1,"pageSize":200} "payload58_5": {"queryObject":{"deptId":"%s","hosId":"h0347","goodsMfrsName":"北京国瑞辉煌医疗器械有限公司","goodsName":"荧光试纸-试剂","goodsSpec":"","purModes":["60"]},"pageNum":1,"pageSize":200} "payload58_6": {"deptId":"%s","hosGoodsId":"h034700001743","grantRule":1,"purMode":10} "payload58_7": {"deptId":"%s","hosGoodsId":"h034700001743222","grantRule":1,"purMode":10} diff --git a/report/summary.html b/report/summary.html index b8623c0a..769bdbc4 100644 --- a/report/summary.html +++ b/report/summary.html @@ -72,9 +72,9 @@ - o5科室管理_科室产品分配_添加科室产品页面_查询全部 + o6科室管理_科室产品分配_添加科室产品页面_条件查询 成功 - 2.526 + 2.42 xiaohesheng -- GitLab