diff --git "a/air_case/a4_mdm3_cm/a1\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267_\345\256\242\346\210\267\347\261\273\345\236\213_\345\214\273\351\231\242_\347\231\273\345\275\225_\345\214\273\351\231\242\347\231\273\345\275\225\350\216\267\345\217\226\345\214\273\351\231\242id.air/a1\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267_\345\256\242\346\210\267\347\261\273\345\236\213_\345\214\273\351\231\242_\347\231\273\345\275\225_\345\214\273\351\231\242\347\231\273\345\275\225\350\216\267\345\217\226\345\214\273\351\231\242id.py" "b/air_case/a4_mdm3_cm/a1\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267_\345\256\242\346\210\267\347\261\273\345\236\213_\345\214\273\351\231\242_\347\231\273\345\275\225_\345\214\273\351\231\242\347\231\273\345\275\225\350\216\267\345\217\226\345\214\273\351\231\242id.air/a1\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267_\345\256\242\346\210\267\347\261\273\345\236\213_\345\214\273\351\231\242_\347\231\273\345\275\225_\345\214\273\351\231\242\347\231\273\345\275\225\350\216\267\345\217\226\345\214\273\351\231\242id.py" index 5cde29f8da0e7db2dedc6d1680579b614ec69aaf..e8cc2e3d74764ffadc19bbe9c10ead553024f94a 100644 --- "a/air_case/a4_mdm3_cm/a1\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267_\345\256\242\346\210\267\347\261\273\345\236\213_\345\214\273\351\231\242_\347\231\273\345\275\225_\345\214\273\351\231\242\347\231\273\345\275\225\350\216\267\345\217\226\345\214\273\351\231\242id.air/a1\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267_\345\256\242\346\210\267\347\261\273\345\236\213_\345\214\273\351\231\242_\347\231\273\345\275\225_\345\214\273\351\231\242\347\231\273\345\275\225\350\216\267\345\217\226\345\214\273\351\231\242id.py" +++ "b/air_case/a4_mdm3_cm/a1\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267_\345\256\242\346\210\267\347\261\273\345\236\213_\345\214\273\351\231\242_\347\231\273\345\275\225_\345\214\273\351\231\242\347\231\273\345\275\225\350\216\267\345\217\226\345\214\273\351\231\242id.air/a1\344\276\233\350\264\247\345\205\263\347\263\273\347\224\263\350\257\267_\345\256\242\346\210\267\347\261\273\345\236\213_\345\214\273\351\231\242_\347\231\273\345\275\225_\345\214\273\351\231\242\347\231\273\345\275\225\350\216\267\345\217\226\345\214\273\351\231\242id.py" @@ -31,10 +31,12 @@ def h_login(): 输出:"rtn_msg": token,projectCode,uxid,corpId,h_name """ #供货关系申请_客户类型_医院_登录_医院登录获取医院id - #如果需要h0347账号登录,这里就从文件获取 module = "a4_mdm3_cm" + #如果需要h0347医院账号登录,这里就从data文件获取登录医院的用户名 + #username = commonFuc().get_business_data(module, "username") username = h_name print('医院名称',username) + # password = commonFuc().get_business_data(module, "password1") password = commonFuc().get_business_data(module, "password") print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') # 获取token和projectCode diff --git "a/air_case/b3_herp3_purchase/a_a1_\346\211\213\345\267\245\351\207\207\350\264\255\350\256\241\345\210\222_\346\267\273\345\212\240\344\272\247\345\223\201\351\241\265\351\235\242_\345\210\227\350\241\250\346\237\245\350\257\242_\346\237\245\350\257\242\345\205\250\351\203\250.air/a_a1_\346\211\213\345\267\245\351\207\207\350\264\255\350\256\241\345\210\222_\346\267\273\345\212\240\344\272\247\345\223\201\351\241\265\351\235\242_\345\210\227\350\241\250\346\237\245\350\257\242_\346\237\245\350\257\242\345\205\250\351\203\250.py" "b/air_case/b3_herp3_purchase/a_a1_\346\211\213\345\267\245\351\207\207\350\264\255\350\256\241\345\210\222_\346\267\273\345\212\240\344\272\247\345\223\201\351\241\265\351\235\242_\345\210\227\350\241\250\346\237\245\350\257\242_\346\237\245\350\257\242\345\205\250\351\203\250.air/a_a1_\346\211\213\345\267\245\351\207\207\350\264\255\350\256\241\345\210\222_\346\267\273\345\212\240\344\272\247\345\223\201\351\241\265\351\235\242_\345\210\227\350\241\250\346\237\245\350\257\242_\346\237\245\350\257\242\345\205\250\351\203\250.py" index 8229efb53b679f7c7aa820f2eca726873486b6cc..995a0566c9125336028082a1602cbd200ed83446 100644 --- "a/air_case/b3_herp3_purchase/a_a1_\346\211\213\345\267\245\351\207\207\350\264\255\350\256\241\345\210\222_\346\267\273\345\212\240\344\272\247\345\223\201\351\241\265\351\235\242_\345\210\227\350\241\250\346\237\245\350\257\242_\346\237\245\350\257\242\345\205\250\351\203\250.air/a_a1_\346\211\213\345\267\245\351\207\207\350\264\255\350\256\241\345\210\222_\346\267\273\345\212\240\344\272\247\345\223\201\351\241\265\351\235\242_\345\210\227\350\241\250\346\237\245\350\257\242_\346\237\245\350\257\242\345\205\250\351\203\250.py" +++ "b/air_case/b3_herp3_purchase/a_a1_\346\211\213\345\267\245\351\207\207\350\264\255\350\256\241\345\210\222_\346\267\273\345\212\240\344\272\247\345\223\201\351\241\265\351\235\242_\345\210\227\350\241\250\346\237\245\350\257\242_\346\237\245\350\257\242\345\205\250\351\203\250.air/a_a1_\346\211\213\345\267\245\351\207\207\350\264\255\350\256\241\345\210\222_\346\267\273\345\212\240\344\272\247\345\223\201\351\241\265\351\235\242_\345\210\227\350\241\250\346\237\245\350\257\242_\346\237\245\350\257\242\345\205\250\351\203\250.py" @@ -55,6 +55,7 @@ def test1(): commonFuc().check_text_exist(0, result) else: commonFuc().check_text_exist('error', result) - + #返回三个产品,包含低值,高值,试剂 + data1=commonFuc().analysis_json('data', data) test1() diff --git "a/air_case/b3_herp3_purchase/a_c5_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\346\250\241\347\263\212\346\237\245\350\257\242_\346\240\271\346\215\256\351\207\207\350\264\255\350\256\241\345\210\222\345\217\267.air/a_c5_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\346\250\241\347\263\212\346\237\245\350\257\242_\346\240\271\346\215\256\351\207\207\350\264\255\350\256\241\345\210\222\345\217\267.py" "b/air_case/b3_herp3_purchase/a_c5_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\346\250\241\347\263\212\346\237\245\350\257\242_\346\240\271\346\215\256\351\207\207\350\264\255\350\256\241\345\210\222\345\217\267.air/a_c5_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\346\250\241\347\263\212\346\237\245\350\257\242_\346\240\271\346\215\256\351\207\207\350\264\255\350\256\241\345\210\222\345\217\267.py" new file mode 100644 index 0000000000000000000000000000000000000000..391d29777d75569cf9aeb59fe84ec19a77925ed8 --- /dev/null +++ "b/air_case/b3_herp3_purchase/a_c5_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\346\250\241\347\263\212\346\237\245\350\257\242_\346\240\271\346\215\256\351\207\207\350\264\255\350\256\241\345\210\222\345\217\267.air/a_c5_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\346\250\241\347\263\212\346\237\245\350\257\242_\346\240\271\346\215\256\351\207\207\350\264\255\350\256\241\345\210\222\345\217\267.py" @@ -0,0 +1,77 @@ +# -*- encoding=utf8 -*- +from common.fileUtls import FileUtils +from common.timeUtils import timeUtils + +__author__ = "xiaohesheng" + +""" +case_tag:api,herp-web,a_c5_采购计划审核_列表查询_条件查询_模糊查询_根据采购计划号,id2297,id2297-25,sit,on +内网:a_c5_采购计划审核_列表查询_条件查询_模糊查询_根据采购计划号 +""" + +from common.common_func import commonFuc +from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system +from airtest.core.api import using +import sys + + +def test1(): + module = "b3_herp3_purchase" + """ + 场景:a_c5_采购计划审核_列表查询_条件查询_模糊查询_根据采购计划号 + 用例名称:a_c5_采购计划审核_列表查询_条件查询_模糊查询_根据采购计划号 + 输入:无 + 输出:"rtn_msg": {"code": 0, "msg": null, "data": true} + """ + # 内网登录 + 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() + # print( token,projectCode,uxid,corpId,info) + # + url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "herpService_purPlan_listVoPage_url") + print(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")) + print('headers', headers) + # # #获取日期 + # date1=timeUtils().get_time_hms(2) + # date2=timeUtils().get_time_add(-1) + # print(date1,date2) + info = FileUtils().r_info8(module, "采购计划信息", 'message') + print(info) + orderNo = info['orderNo'] + print(type(orderNo)) + list_a = [] + orderNo1 = orderNo[0:8] # 获取模糊查询前面的字符串 + orderNo2 = orderNo[8:len(orderNo) - 1] # 获取模糊查询后面的字符串 + orderNo3 = orderNo[8:12] # 获取模糊查询中间的字符串 + # print(orderNo3,'aaaaaaaabbbbbbbbbbbcccccccccccccccc') + list_a.append(orderNo1) + list_a.append(orderNo2) + list_a.append(orderNo3) + print('list_a', list_a) + # # 请求体 + for i in list_a: + request_body = commonFuc().get_business_data(module, "payload18_1", i) + print('request_body', request_body) + # 发送请求 + result = commonFuc().http_post(url, request_body, headers) + print('result', result) + # 断言 + code = commonFuc().analysis_json('code', result) + data = commonFuc().analysis_json('data', result) + total = commonFuc().analysis_json('total', data) + if code == 0 and total >= 1: + commonFuc().check_text_exist(0, result) + + else: + commonFuc().check_text_exist('error', result) + + +test1() diff --git "a/air_case/b3_herp3_purchase/a_c6_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\345\274\202\345\270\270\346\237\245\350\257\242_\345\210\266\345\215\225\346\227\266\351\227\264.air/a_c6_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\345\274\202\345\270\270\346\237\245\350\257\242_\345\210\266\345\215\225\346\227\266\351\227\264.py" "b/air_case/b3_herp3_purchase/a_c6_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\345\274\202\345\270\270\346\237\245\350\257\242_\345\210\266\345\215\225\346\227\266\351\227\264.air/a_c6_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\345\274\202\345\270\270\346\237\245\350\257\242_\345\210\266\345\215\225\346\227\266\351\227\264.py" new file mode 100644 index 0000000000000000000000000000000000000000..4e932373922394435da9b5c25908e9cd329d9158 --- /dev/null +++ "b/air_case/b3_herp3_purchase/a_c6_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\345\274\202\345\270\270\346\237\245\350\257\242_\345\210\266\345\215\225\346\227\266\351\227\264.air/a_c6_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\345\274\202\345\270\270\346\237\245\350\257\242_\345\210\266\345\215\225\346\227\266\351\227\264.py" @@ -0,0 +1,66 @@ +# -*- encoding=utf8 -*- +from common.fileUtls import FileUtils +from common.timeUtils import timeUtils + +__author__ = "xiaohesheng" + +""" +case_tag:api,herp-web,a_c6_采购计划审核_列表查询_条件查询_异常查询_制单时间,id2297,id2297-26,sit,on +内网:a_c6_采购计划审核_列表查询_条件查询_异常查询_制单时间 +""" + +from common.common_func import commonFuc +from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system +from airtest.core.api import using +import sys + + +def test1(): + module = "b3_herp3_purchase" + """ + 场景:a_c6_采购计划审核_列表查询_条件查询_异常查询_制单时间 + 用例名称:a_c6_采购计划审核_列表查询_条件查询_异常查询_制单时间 + 输入:无 + 输出:"rtn_msg": {"code": 0, "msg": null, "data": true} + """ + # 内网登录 + 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() + # print( token,projectCode,uxid,corpId,info) + # + url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "herpService_purPlan_listVoPage_url") + print(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")) + print('headers', headers) + # #获取日期 + date1 = timeUtils().get_time_hms(2) + date2 = timeUtils().get_time_add(-1) + print(date1, date2) + # info = FileUtils().r_info8(module, "采购计划信息", 'message') + # print(info) + # orderNo = info['orderNo'] + # # 请求体 + request_body = commonFuc().get_business_data(module, "payload18_2", date1, date2) + print('request_body', request_body) + # 发送请求 + result = commonFuc().http_post(url, request_body, headers) + print('result', result) + # 断言 + code = commonFuc().analysis_json('code', result) + data = commonFuc().analysis_json('data', result) + total = commonFuc().analysis_json('total', data) + if code == 0 and total == 0: + commonFuc().check_text_exist(0, result) + + else: + commonFuc().check_text_exist('error', result) + + +test1() diff --git "a/air_case/b3_herp3_purchase/a_c7_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\345\274\202\345\270\270\346\237\245\350\257\242_\346\240\271\346\215\256\351\207\207\350\264\255\350\256\241\345\210\222\345\217\267.air/a_c7_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\345\274\202\345\270\270\346\237\245\350\257\242_\346\240\271\346\215\256\351\207\207\350\264\255\350\256\241\345\210\222\345\217\267.py" "b/air_case/b3_herp3_purchase/a_c7_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\345\274\202\345\270\270\346\237\245\350\257\242_\346\240\271\346\215\256\351\207\207\350\264\255\350\256\241\345\210\222\345\217\267.air/a_c7_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\345\274\202\345\270\270\346\237\245\350\257\242_\346\240\271\346\215\256\351\207\207\350\264\255\350\256\241\345\210\222\345\217\267.py" new file mode 100644 index 0000000000000000000000000000000000000000..0e9f1652cd21403672d1068dde72e5d525b4c7fe --- /dev/null +++ "b/air_case/b3_herp3_purchase/a_c7_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\345\274\202\345\270\270\346\237\245\350\257\242_\346\240\271\346\215\256\351\207\207\350\264\255\350\256\241\345\210\222\345\217\267.air/a_c7_\351\207\207\350\264\255\350\256\241\345\210\222\345\256\241\346\240\270_\345\210\227\350\241\250\346\237\245\350\257\242_\346\235\241\344\273\266\346\237\245\350\257\242_\345\274\202\345\270\270\346\237\245\350\257\242_\346\240\271\346\215\256\351\207\207\350\264\255\350\256\241\345\210\222\345\217\267.py" @@ -0,0 +1,64 @@ +# -*- encoding=utf8 -*- +from common.fileUtls import FileUtils +from common.timeUtils import timeUtils + +__author__ = "xiaohesheng" + +""" +case_tag:api,herp-web,a_c7_采购计划审核_列表查询_条件查询_异常查询_根据采购计划号,id2297,id2297-27,sit,on +内网:a_c7_采购计划审核_列表查询_条件查询_异常查询_根据采购计划号 +""" + +from common.common_func import commonFuc +from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system +from airtest.core.api import using +import sys + + +def test1(): + module = "b3_herp3_purchase" + """ + 场景:a_c7_采购计划审核_列表查询_条件查询_异常查询_根据采购计划号 + 用例名称:a_c7_采购计划审核_列表查询_条件查询_异常查询_根据采购计划号 + 输入:无 + 输出:"rtn_msg": {"code": 0, "msg": null, "data": true} + """ + # 内网登录 + 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() + # print( token,projectCode,uxid,corpId,info) + # + url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "herpService_purPlan_listVoPage_url") + print(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")) + print('headers', headers) + str = commonFuc().get_business_data(module, 'data3') + list2 = list(str.split(",")) + print(list2) + for i in list2: + # # 请求体 + request_body = commonFuc().get_business_data(module, "payload18_1", i) + # 发送请求 + result = commonFuc().http_post(url, request_body, headers) + print('result', result) + # 断言i + code = commonFuc().analysis_json('code', result) + data = commonFuc().analysis_json('data', result) + total = commonFuc().analysis_json('total', data) + closeStatus = commonFuc().analysis_json('closeStatus', data) + print('closeStatus', closeStatus) + if code == 0 and len(data) >= 0 and total == 0: + commonFuc().check_text_exist(0, result) + else: + commonFuc().check_text_exist('error', result) + + + +test1() diff --git a/report/summary.html b/report/summary.html index 663db043f0eaf1afb7058a192a2ad0480be1ce27..cf09310c83ff7fea11709696d460b3e649260a1e 100644 --- a/report/summary.html +++ b/report/summary.html @@ -72,9 +72,9 @@