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
19d20a7c
Commit
19d20a7c
authored
Sep 08, 2023
by
xiao-hesheng
Browse files
医院注册_注册时医院已存在_公立医院
产品信息维护 分页查询供应商产品数据表
parent
8a01cbd8
Changes
8
Hide whitespace changes
Inline
Side-by-side
air_case/mdm3-ea/注册企业锁定认领审核流程.air/注册企业锁定认领审核流程.py
View file @
19d20a7c
...
...
@@ -32,7 +32,7 @@ username = commonFuc().get_business_data(module, "username")
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
# 获取token和projectCode
token
,
projectCode
,
uxid
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
#获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
...
...
air_case/mdm3-ea/注册企业锁定认领审核驳回流程.air/注册企业锁定认领审核驳回流程.py
View file @
19d20a7c
...
...
@@ -32,7 +32,7 @@ username = commonFuc().get_business_data(module, "username")
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
# 获取token和projectCode
token
,
projectCode
,
uxid
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
#获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
...
...
air_case/mdm3-hs/注册医院审核通过.air/注册医院审核通过.py
View file @
19d20a7c
...
...
@@ -33,7 +33,7 @@ username = commonFuc().get_business_data(module, "username")
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
# 获取token和projectCode
token
,
projectCode
,
uxid
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"queryListPage_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
...
...
air_case/mdm3-hs/注册医院审核驳回.air/注册医院审核驳回.py
View file @
19d20a7c
...
...
@@ -33,7 +33,7 @@ username = commonFuc().get_business_data(module, "username")
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
# 获取token和projectCode
token
,
projectCode
,
uxid
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"queryListPage_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
...
...
air_case/mdm3-pim/产品新增和审核通过.air/产品新增和审核通过.py
0 → 100644
View file @
19d20a7c
# -*- encoding=utf8 -*-
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web企业审核,用例集id2248,sit,on,2023090802
主数据平台:产品新增和审核通过
"""
from
common.common_func
import
commonFuc
from
air_case.mdm_login.登录外网系统.登录外网系统
import
login_system
def
Enterprise_audit
():
module
=
"mdm3-ea"
# 注册企业
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"CompanyRegist_url"
)
# #获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
))
print
(
headers
)
name
=
commonFuc
().
get_business_data
(
module
,
"name1"
)
# 获取前缀name
cname
=
name
+
commonFuc
().
randomString
(
5
)
# 随机数生成拼接企业名称
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload"
,
cname
,
cname
,
cname
,
cname
,
cname
,
cname
)
print
(
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# 获取接口返回id
id1
=
commonFuc
().
analysis_json
(
'id'
,
result
)
# 企业注册提交接口_认领
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"updateById_url"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
#获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
projectCode
,
token
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload1"
,
id1
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# # print(result)
#获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict"
)
print
(
check_dict
)
#断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
#=============== 企业注册提交接口_认领结束
#企业审核接口_查询数据_开始
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"queryListPage_url"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload2"
,
cname
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
#获取接口返回数据
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
#断言实际结果中是否包含预期结果的内容
# commonFuc().check_result(code, result)
#断言实际结果中是否包含预期的文本
commonFuc
().
check_text_exist
(
code
,
result
)
#===============企业注册提交接口_查询数据_结束
#企业注册提交接口_锁定_开始
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"queryAlCompanyRegistInfo_url"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload3"
,
id1
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
#获取接口返回数据
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
#断言实际结果中是否包含预期结果的内容
commonFuc
().
check_text_exist
(
code
,
result
)
#===============企业注册提交接口_锁定_结束
#企业审核接口_再次查询数据_开始
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"upCompanyList_url"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload4"
,
cname
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
#获取接口返回数据
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
#断言实际结果中是否包含预期结果的内容
commonFuc
().
check_text_exist
(
code
,
result
)
#===============企业注册提交接口_查询数据_结束
#企业注册提交接口_审核通过_开始
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"auditCompanyRegistBill_url"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload5"
,
id1
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# print('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',result)
#获取接口返回数据
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
check_dict1
=
commonFuc
().
get_business_data
(
module
,
"checkDict1"
)
#断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict1
,
result
)
return
cname
#===============企业注册提交接口_审核通过_结束
module
=
"mdm3-pim"
#登录
username
=
Enterprise_audit
()
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
=
login_system
(
username
,
password
).
get_token
()
#分页查询供应商产品数据接口
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"listVoPage_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
,
"payload"
,
corpId
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
# print('实际值',result)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
data
)
# print('aaaaaaaaaaaaaaaaaaaaaaaaaaaa',data)
# 断言实际结果中是否包含预期结果的内容
#新注册的企业首次查询产品信息,预期结果为空
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict"
)
# print('预期值',check_dict)
commonFuc
().
check_text_exist
(
code
,
result
)
#检查验证码
commonFuc
().
check_text_exist
(
data
,
result
)
#检查数据data为空[]
air_case/mdm_login/登录外网系统/登录外网系统.py
View file @
19d20a7c
...
...
@@ -66,7 +66,8 @@ class login_system():
# print(check_dict)
# 断言实际结果中是否不包含预期的文本
commonFuc
().
check_text_exist
(
uxid
,
result
)
return
token
,
projectCode
,
uxid
corpId
=
commonFuc
().
analysis_json
(
'corpId'
,
result
)
return
token
,
projectCode
,
uxid
,
corpId
# login_system('test001', 'a123456!').get_token()
...
...
data/mdm3-pim/data
0 → 100644
View file @
19d20a7c
"listVoPage_url": "/test2api/mdmService/provGoodsInfo/listVoPage"
# 医院注册提交接口_认领
"queryListPage_url": "/test2api/mdmService/companyRegistBill/listPage"
"updateById_url": "/test2api/mdmService/companyRegistBill/updateById"
"checkHosRegistInfo_url": "/test2api/mdmService/companyRegistBill/checkHosRegistInfo"
"username": "1679886114521"
"password": "a123456!"
json_contentType: "application/json"
json_headers: {
"Content-Type": "%s"
}
json_headers2: {
"Content-Type": "%s",
"token": "%s",
"X-APP-CODE":"%s"
}
"payload": {
"pageNum": 1,
"pageSize": 20,
"queryObject": {
"pid": "",
"provId": "%s",
"goodsName": "",
"goodsMfrsName": "",
"isAbroad": "",
"purpose": "",
"mgrLevel": "",
"status": 0
}
}
"payload1": {
"hosProperty": "私立医院",
"cname": "%s",
"shortName": "%s",
"hosLevel": "三级甲等",
"area": "湖南省长沙市下陆区",
"code": "420101",
"address": "湖南省长沙市下陆区",
"userLoginCode": "%s",
"userName": "%s",
"userLoginPsw": "a123456!",
"confimPassword": "a123456!",
"registContactUser": "%s",
"registContactWay": "%s",
"email": "%s@sina.com",
"compKind": 2,
"compFunction": 1,
"isAbroad": 0,
"isLocked": 0,
"auditStatus": 10,
"registSourceProject": "0000",
"dataEntrance": "注册",
"createUser": "%s",
"hoslevelName": ""
}
"payload2": {
"pageNum": 1,
"pageSize": 100,
"queryObject": {
"compFunction": 1,
"auditStatus": 10,
"cname": "%s"
}
}
"payload3": {
"id": "%s",
"isLocked": 1,
"auditor": "%s",
"auditStartTime": "%s"
}
"payload4": {
"id": "%s",
"lastModified": "%s",
"version": 1,
"createTime": "%s",
"createUser": "%s",
"lastModifiedUser": "%s",
"userLoginCode": "%s",
"userLoginPsw": "a123456!",
"userName": "%s",
"cname": "%s",
"shortName": "%s",
"upCompanyId": null,
"compKind": 2,
"compFunction": "1",
"area": "湖南省长沙市市辖区",
"legal": null,
"address": "湖南省人民医院附属医院",
"isAbroad": 0,
"nation": null,
"registContactUser": "%s",
"registContactWay": "%s",
"email": "%s@sina.com",
"hosProperty": "1",
"hosLevel": "三级甲等",
"erpCode": null,
"regCode": null,
"jyxkCode": null,
"jyxkbaCode": null,
"scxkzCode": null,
"scbapzCode": null,
"isLocked": 1,
"auditStatus": 30,
"auditStartTime": "%s",
"auditEndTime": "%s",
"auditor": "%s",
"auditComment": "test",
"registSourceProject": "0000",
"dataEntrance": "注册",
"createUserCorpId": null
}
"payload5": {
"id": "%s",
"auditStatus": 30,
"auditComment": "驳回",
"auditor": "%s",
"auditEndTime": "%s"
}
"name1": "湖南省人民医院"
checkDict: {"code": 0, "msg":None,"data": {"pageNum": 1, "pageSize": 20, "total": 0, "data": [], "totalInfo": None}}
checkDict1: {"code": -2,"msg": "医院已被注册,请耐心等待审核通知!", "data": None}
checkDict2: {'code': 0, 'msg': None, 'data': 'success'}
report/summary.html
View file @
19d20a7c
...
...
@@ -56,7 +56,7 @@
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分
0
秒
</td>
<td
class=
'details-col-elapsed'
>
0分
1
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
</table>
...
...
@@ -72,9 +72,9 @@
</tr>
<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=
"details-col-elapsed"
>
0.88
</td>
<td
class=
"details-col-elapsed"
>
1.663
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</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