Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-spd
Commits
e91b495a
Commit
e91b495a
authored
Sep 11, 2023
by
xiao-hesheng
Browse files
产品信息申报
产品信息审核_查询 产品信息审核_锁定 修改tag ,去掉中文
parent
87c491f7
Changes
18
Hide whitespace changes
Inline
Side-by-side
air_case/mdm3-ea/注册企业锁定认领审核流程.air/注册企业锁定认领审核流程.py
View file @
e91b495a
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web企业审核,
用例集
id2248,sit,on
case_tag:api,mdm-web企业审核,id2248,sit,on
主数据平台:注册企业审核认领流程
主数据平台:注册企业审核认领流程
"""
"""
...
...
air_case/mdm3-ea/注册企业锁定认领审核驳回流程.air/注册企业锁定认领审核驳回流程.py
View file @
e91b495a
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web企业审核,
用例集
id2248,sit,on
case_tag:api,mdm-web企业审核,id2248,sit,on
主数据平台:注册企业审核驳回认领流程
主数据平台:注册企业审核驳回认领流程
"""
"""
...
...
air_case/mdm3-es/器械注册人_企业注册提交_正常注册_境内.air/器械注册人_企业注册提交_正常注册_境内.py
View file @
e91b495a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web境内,
用例集
id2232,sit,on
case_tag:api,mdm-web境内,id2232,sit,on
主数据平台:注册企业接口
主数据平台:注册企业接口
"""
"""
...
...
air_case/mdm3-es/外网企业注册-器械注册人-所有输入项填写.air/外网企业注册-器械注册人-所有输入项填写.py
View file @
e91b495a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web2,
用例集
id2232,sit,on
case_tag:api,mdm-web2,id2232,sit,on
主数据平台:注册企业接口_注册时_有附件
主数据平台:注册企业接口_注册时_有附件
"""
"""
...
...
air_case/mdm3-es/外网企业注册-器械注册人-有附件.air/外网企业注册-器械注册人-有附件.py
View file @
e91b495a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web1,
用例集
id2232,sit,on
case_tag:api,mdm-web1,id2232,sit,on
主数据平台:注册企业接口_注册时_有附件
主数据平台:注册企业接口_注册时_有附件
"""
"""
...
...
air_case/mdm3-es/外网企业注册-器械注册人.air/外网企业注册-器械注册人.py
View file @
e91b495a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web,
用例集
id2232,sit,on
case_tag:api,mdm-web,id2232,sit,on
主数据平台:注册企业接口
主数据平台:注册企业接口
"""
"""
...
...
air_case/mdm3-es/外网企业注册提交接口_正常注册.air/外网企业注册提交接口_正常注册.py
View file @
e91b495a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web正常注册,
用例集
id2232,sit,on
case_tag:api,mdm-web正常注册,id2232,sit,on
主数据平台:注册企业接口
主数据平台:注册企业接口
"""
"""
...
...
air_case/mdm3-es/外网企业注册提交接口_注册企业已存在.air/外网企业注册提交接口_注册企业已存在.py
View file @
e91b495a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web注册企业已存在,
用例集
id2232,sit,on
case_tag:api,mdm-web注册企业已存在,id2232,sit,on
主数据平台:注册企业接口
主数据平台:注册企业接口
"""
"""
...
...
air_case/mdm3-es/生产厂商_企业注册提交_正常注册.air/生产厂商_企业注册提交_正常注册.py
View file @
e91b495a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web生产厂商正常注册,
用例集
id2232,sit,on
case_tag:api,mdm-web生产厂商正常注册,id2232,sit,on
主数据平台:生产厂商_企业注册提交_正常注册
主数据平台:生产厂商_企业注册提交_正常注册
"""
"""
...
...
air_case/mdm3-es/经销商_企业注册提交_正常注册.air/经销商_企业注册提交_正常注册.py
View file @
e91b495a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web经销商正常注册,
用例集
id2232,sit,on
case_tag:api,mdm-web经销商正常注册,id2232,sit,on
主数据平台:经销商_企业注册提交_正常注册
主数据平台:经销商_企业注册提交_正常注册
"""
"""
...
...
air_case/mdm3-hs/医院注册_正常注册_公立医院.air/医院注册_正常注册_公立医院.py
View file @
e91b495a
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web,公立医院注册,
用例集
id2249,sit,on,10086
case_tag:api,mdm-web,公立医院注册,id2249,sit,on,10086
主数据平台:公立医院注册
主数据平台:公立医院注册
"""
"""
from
common.common_func
import
commonFuc
from
common.common_func
import
commonFuc
...
...
air_case/mdm3-hs/医院注册_正常注册_私立医院.air/医院注册_正常注册_私立医院.py
View file @
e91b495a
...
@@ -4,7 +4,7 @@ __author__ = "xiaohesheng"
...
@@ -4,7 +4,7 @@ __author__ = "xiaohesheng"
"""
"""
暂未调试脚本
暂未调试脚本
case_tag:api,mdm-web私立医院注册,
用例集
id2249,sit,on,10086
case_tag:api,mdm-web私立医院注册,id2249,sit,on,10086
主数据平台:私立医院注册
主数据平台:私立医院注册
"""
"""
from
common.common_func
import
commonFuc
from
common.common_func
import
commonFuc
...
...
air_case/mdm3-hs/注册医院审核通过.air/注册医院审核通过.py
View file @
e91b495a
...
@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
...
@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web,注册医院审核通过,
用例集
id2249,sit,on,20230907
case_tag:api,mdm-web,注册医院审核通过,id2249,sit,on,20230907
主数据平台:注册医院审核通过
主数据平台:注册医院审核通过
"""
"""
from
common.common_func
import
commonFuc
from
common.common_func
import
commonFuc
...
...
air_case/mdm3-hs/注册医院审核驳回.air/注册医院审核驳回.py
View file @
e91b495a
...
@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
...
@@ -5,7 +5,7 @@ from common.timeUtils import timeUtils
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web,注册医院审核驳回,
用例集
id2249,sit,on,202309072
case_tag:api,mdm-web,注册医院审核驳回,id2249,sit,on,202309072
主数据平台:注册医院审核驳回
主数据平台:注册医院审核驳回
"""
"""
from
common.common_func
import
commonFuc
from
common.common_func
import
commonFuc
...
...
air_case/mdm3-pim/产品新增和审核通过.air/产品新增和审核通过.py
View file @
e91b495a
# -*- encoding=utf8 -*-
# -*- encoding=utf8 -*-
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web企业审核,
用例集
id2248,sit,on,2023090802
case_tag:api,mdm-web企业审核,id2248,sit,on,2023090802
主数据平台:产品新增和审核通过
主数据平台:产品新增和审核通过
"""
"""
...
@@ -115,7 +116,6 @@ headers = commonFuc().get_business_data(module, "json_headers2",
...
@@ -115,7 +116,6 @@ headers = commonFuc().get_business_data(module, "json_headers2",
projectCode
)
projectCode
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload"
,
corpId
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload"
,
corpId
)
# 发送请求
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# print('实际值',result)
# print('实际值',result)
...
@@ -129,4 +129,44 @@ check_dict = commonFuc().get_business_data(module, "checkDict")
...
@@ -129,4 +129,44 @@ check_dict = commonFuc().get_business_data(module, "checkDict")
# print('预期值',check_dict)
# print('预期值',check_dict)
commonFuc
().
check_text_exist
(
code
,
result
)
#检查验证码
commonFuc
().
check_text_exist
(
code
,
result
)
#检查验证码
commonFuc
().
check_text_exist
(
data
,
result
)
#检查数据data为空[]
commonFuc
().
check_text_exist
(
data
,
result
)
#检查数据data为空[]
#产品申报
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"submitGoodsRegist_url"
)
#获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
projectCode
)
p_name
=
commonFuc
().
get_business_data
(
module
,
"name1"
)
# 获取前缀name
p_name
=
p_name
+
commonFuc
().
randomString
(
5
)
# 随机数生成拼接产品名称
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload6"
,
p_name
,
p_name
,
p_name
,
p_name
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# print("新增产品返回结果",result)
goodsRegistVO
=
commonFuc
().
analysis_json
(
'goodsRegistVO'
,
result
)
goodsName
=
commonFuc
().
analysis_json
(
'goodsName'
,
goodsRegistVO
)
commonFuc
().
check_text_exist
(
goodsName
,
result
)
#检查返回结果中是否存在新增的产品名称
#===================产品查询==========================================
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"listAuditBillByPage_url"
)
#获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
projectCode
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload7"
,
p_name
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# print('查询产品信息',result)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
GRBid
=
commonFuc
().
analysis_json
(
'id'
,
data
)
#===================产品查询后锁定==========================================
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"updateById_url2"
)
#获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
projectCode
)
now
=
timeUtils
().
get_time_hms
()
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload8"
,
GRBid
,
uxid
,
now
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# print('锁定结果',result)
#===================产品锁定后查询获取必要信息==========================================
\ No newline at end of file
common/common_func.py
View file @
e91b495a
...
@@ -509,7 +509,7 @@ class commonFuc(object):
...
@@ -509,7 +509,7 @@ class commonFuc(object):
chrome
.
implicitly_wait
(
10
)
# 隐式等待 10秒
chrome
.
implicitly_wait
(
10
)
# 隐式等待 10秒
chrome
.
get
(
url
)
chrome
.
get
(
url
)
return
chrome
# 所以函数必须返回firefox,后面的脚本才能使用
return
chrome
def
logIn
(
self
,
username
,
password
,
login_button
,
chrome
):
def
logIn
(
self
,
username
,
password
,
login_button
,
chrome
):
chrome
.
find_element_by_xpath
(
username
).
clear
()
chrome
.
find_element_by_xpath
(
username
).
clear
()
...
...
data/mdm3-pim/data
View file @
e91b495a
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
"queryListPage_url": "/test2api/mdmService/companyRegistBill/listPage"
"queryListPage_url": "/test2api/mdmService/companyRegistBill/listPage"
"updateById_url": "/test2api/mdmService/companyRegistBill/updateById"
"updateById_url": "/test2api/mdmService/companyRegistBill/updateById"
"checkHosRegistInfo_url": "/test2api/mdmService/companyRegistBill/checkHosRegistInfo"
"checkHosRegistInfo_url": "/test2api/mdmService/companyRegistBill/checkHosRegistInfo"
"submitGoodsRegist_url": "/test2api/mdmService/goodsRegistBill/submitGoodsRegist"
"listAuditBillByPage_url": "/test2api/mdmService/goodsRegistBill/listAuditBillByPage"
"updateById_url2": "/test2api/mdmService/goodsRegistBill/updateById"
"username": "1679886114521"
"username": "1679886114521"
"password": "a123456!"
"password": "a123456!"
...
@@ -121,7 +124,95 @@ json_headers2: {
...
@@ -121,7 +124,95 @@ json_headers2: {
"auditor": "%s",
"auditor": "%s",
"auditEndTime": "%s"
"auditEndTime": "%s"
}
}
"name1": "湖南省人民医院"
"payload6": {
"goodsRegistVO": {
"goodsMfrsName": "",
"goodsMfrsId": "p56a4",
"goodsName": "%s",
"property": 1,
"brand": "辉瑞中国",
"hosName": "",
"hosId": "h0347",
"isAbroad": 0,
"goodsAgentMfrsName": "",
"goodsAgentMfrsId": "p56a4",
"mgrLevel": "3",
"purpose": "01",
"purposeName": "有源手术器械",
"kind68Code": "6801",
"kind68CodeName": "基础外科手术器械",
"miDjmc": "%s",
"mi20code": "12345678901234567890",
"made": "美国",
"certCode": "1234567890",
"certKind": "0",
"certKindName": "医疗器械注册证",
"expdtBeginDate": "2023-09-05",
"expdtEndDate": "2079-11-01",
"uploadFileName": "产品图片.png",
"uploadFilePath": "/sfile/2023/pub/src=http___10wallpaper.com_wallp_f7d03d60d2fe42da8be7d65dfe1de601.jpg",
"tableFromDec": [
{
"goodsGg": "10ml",
"miGoodsGg": "10ml",
"miGoodsXh": "%s",
"goodsUseUnit": "支",
"mi27code": "12345678901234567890",
"udiCode": "12345678901234",
"diType": "0",
"rowNum": 1
}
],
"mfrsData": [],
"corpId": "",
"corpName": "",
"importTaskGoodsId": ""
},
"registSourceProject": "h0347",
"corpId": "",
"corpName": "",
"registrationRegistVO": {
"certCode": "1234567890",
"certKind": "0",
"certKindName": "医疗器械注册证",
"expdtBeginDate": "2023-09-05 00:00:00",
"expdtEndDate": "2079-11-01 23:59:59",
"filePath": "/sfile/2023/pub/src=http___10wallpaper.com_wallp_f7d03d60d2fe42da8be7d65dfe1de601.jpg",
"fileOriginalName": "产品图片.png"
},
"goodsSpecsRegistVOList": [
{
"goodsGg": "10ml",
"miGoodsGg": "10ml",
"miGoodsXh": "%s",
"goodsUseUnit": "支",
"mi27code": "12345678901234567890",
"udiCode": "12345678901234",
"diType": "0",
"rowNum": 1
}
]
}
"payload7": {
"pageNum": 1,
"pageSize": 10,
"queryObject": {
"auditStatus": 10,
"billType": 10,
"goodsName": "%s",
"goodsMfrsName": ""
}
}
"payload8": {
"id": "%s",
"isLocked": 1,
"version": 0,
"auditor": "%s",
"auditStartTime": "%s"
}
"name1": "一次性注射器"
checkDict: {"code": 0, "msg":None,"data": {"pageNum": 1, "pageSize": 20, "total": 0, "data": [], "totalInfo": None}}
checkDict: {"code": 0, "msg":None,"data": {"pageNum": 1, "pageSize": 20, "total": 0, "data": [], "totalInfo": None}}
checkDict1: {"code": -2,"msg": "医院已被注册,请耐心等待审核通知!", "data": None}
checkDict1: {"code": -2,"msg": "医院已被注册,请耐心等待审核通知!", "data": None}
checkDict2: {'code': 0, 'msg': None, 'data': 'success'}
checkDict2: {'code': 0, 'msg': None, 'data': 'success'}
report/summary.html
View file @
e91b495a
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分
1
秒
</td>
<td
class=
'details-col-elapsed'
>
0分
2
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
</tr>
</table>
</table>
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/产品新增和审核通过/log.html'
target=
'_blank'
>
产品新增和审核通过
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/产品新增和审核通过/log.html'
target=
'_blank'
>
产品新增和审核通过
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
1.663
</td>
<td
class=
"details-col-elapsed"
>
2.154
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
</tr>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment