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
65aaa304
Commit
65aaa304
authored
Sep 06, 2023
by
xiao-hesheng
Browse files
企业注册提交接口_驳回
医院注册_正常注册_公立医院 医院注册_正常注册_私立医院
parent
307bf74e
Changes
9
Hide whitespace changes
Inline
Side-by-side
air_case/mdm3-ea/注册企业锁定认领审核流程.air/注册企业锁定认领审核流程.py
View file @
65aaa304
...
@@ -3,8 +3,7 @@
...
@@ -3,8 +3,7 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
暂未调试脚本
case_tag:api,mdm-web企业审核,用例集id2248,sit,on
case_tag:api,mdm-web企业审核,用例集id22345,sit,on,10086
主数据平台:注册企业审核认领流程
主数据平台:注册企业审核认领流程
"""
"""
...
@@ -89,7 +88,7 @@ url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "auditCo
...
@@ -89,7 +88,7 @@ url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "auditCo
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload5"
,
id1
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload5"
,
id1
)
# 发送请求
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
,
result
)
#
print('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',result)
#获取接口返回数据
#获取接口返回数据
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
check_dict1
=
commonFuc
().
get_business_data
(
module
,
"checkDict1"
)
check_dict1
=
commonFuc
().
get_business_data
(
module
,
"checkDict1"
)
...
...
air_case/mdm3-ea/注册企业锁定认领审核驳回流程.air/注册企业锁定认领审核驳回流程.py
0 → 100644
View file @
65aaa304
# -*- encoding=utf8 -*-
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web企业审核,用例集id2248,sit,on
主数据平台:注册企业审核驳回认领流程
"""
from
common.common_func
import
commonFuc
from
air_case.mdm_login.登录外网系统.登录外网系统
import
login_system
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
=
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
,
"updateByIdCompanyRegistBill_url"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload6"
,
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
,
"checkDict2"
)
#断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict1
,
result
)
#===============企业注册提交接口_审核驳回_结束
air_case/mdm3-hs/医院注册_正常注册_公立医院.air/医院注册_正常注册_公立医院.py
View file @
65aaa304
...
@@ -3,14 +3,27 @@
...
@@ -3,14 +3,27 @@
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
暂未调试脚本
case_tag:api,mdm-web,公立医院注册,用例集id2249,sit,on,10086
case_tag:api,mdm-web公立医院注册,用例集id2234,sit,on,10086
主数据平台:公立医院注册
主数据平台:公立医院注册
"""
"""
from
common.common_func
import
commonFuc
from
common.common_func
import
commonFuc
from
air_case.mdm_login.登录外网系统.登录外网系统
import
login_system
module
=
"mdm3-hs"
module
=
"mdm3-hs"
# 注册企业
# 注册企业
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"insertHosRegistInfo_url"
)
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"insertHosRegistInfo_url"
)
# #获取请求头信息
# #获取请求头信息
\ No newline at end of file
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
))
h_name
=
commonFuc
().
get_business_data
(
module
,
"name1"
)
# 获取前缀name
h_name
=
h_name
+
commonFuc
().
randomString
(
5
)
# 随机数生成拼接企业名称
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload"
,
h_name
,
h_name
,
h_name
,
h_name
,
h_name
,
h_name
,
h_name
,
h_name
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
#获取接口返回数据
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict"
)
#断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
air_case/mdm3-hs/医院注册_正常注册_私立医院.air/医院注册_正常注册_私立医院.py
View file @
65aaa304
...
@@ -4,6 +4,27 @@ __author__ = "xiaohesheng"
...
@@ -4,6 +4,27 @@ __author__ = "xiaohesheng"
"""
"""
暂未调试脚本
暂未调试脚本
case_tag:api,mdm-web私立医院注册,用例集id22
3
4,sit,on,10086
case_tag:api,mdm-web私立医院注册,用例集id224
9
,sit,on,10086
主数据平台:私立医院注册
主数据平台:私立医院注册
"""
"""
from
common.common_func
import
commonFuc
module
=
"mdm3-hs"
# 注册企业
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"insertHosRegistInfo_url"
)
# #获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
))
h_name
=
commonFuc
().
get_business_data
(
module
,
"name1"
)
# 获取前缀name
h_name
=
h_name
+
commonFuc
().
randomString
(
5
)
# 随机数生成拼接企业名称
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload1"
,
h_name
,
h_name
,
h_name
,
h_name
,
h_name
,
h_name
,
h_name
,
h_name
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
#获取接口返回数据
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict"
)
#断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
air_case/mdm_login/登录外网系统.air/登录外网系统.py
View file @
65aaa304
...
@@ -20,7 +20,7 @@ class login_system():
...
@@ -20,7 +20,7 @@ class login_system():
# 获取验证码接口
# 获取验证码接口
def
get_token
(
self
):
def
get_token
(
self
):
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
self
.
module
,
"VerifyCode_url"
)
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
self
.
module
,
"VerifyCode_url"
)
print
(
"aaaaaaaaaaaaaaaaaa"
+
url
)
#
print("aaaaaaaaaaaaaaaaaa" + url)
# 发送请求
# 发送请求
result
=
commonFuc
().
http_get
(
url
,
headers
=
""
,
params
=
""
)
result
=
commonFuc
().
http_get
(
url
,
headers
=
""
,
params
=
""
)
...
...
common/passwordUtils.py
View file @
65aaa304
import
hashlib
import
hashlib
from
Crypto.Cipher
import
AES
from
Crypto.Cipher
import
AES
...
@@ -14,6 +16,7 @@ class PasswordEncrypt(object):
...
@@ -14,6 +16,7 @@ class PasswordEncrypt(object):
# 此函数实现密码加密
# 此函数实现密码加密
def
pwd_Encrypt
(
self
):
def
pwd_Encrypt
(
self
):
'''
'''
{"username":"gyqxadmin",
{"username":"gyqxadmin",
"passwd":"af5d87060df01ce434e4a397b51a0b9bd960416aa873177889f6a0104b28e450acc980ab8d6391931a8470a91c37c94fad5d14f4925d860fb3314aca9bc4677a3ade29e23fb469b8710680995f8e218f",
"passwd":"af5d87060df01ce434e4a397b51a0b9bd960416aa873177889f6a0104b28e450acc980ab8d6391931a8470a91c37c94fad5d14f4925d860fb3314aca9bc4677a3ade29e23fb469b8710680995f8e218f",
...
@@ -52,5 +55,5 @@ class PasswordEncrypt(object):
...
@@ -52,5 +55,5 @@ class PasswordEncrypt(object):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
aa
=
PasswordEncrypt
(
'1679886114521'
,
'a123456!'
,
b
'
9baf0389a84047fa8e8db78bd8c3530a
'
)
aa
=
PasswordEncrypt
(
'1679886114521'
,
'a123456!'
,
b
'
7382a248d0e94645ba8b5b0cd942370d
'
)
print
(
aa
.
pwd_Encrypt
())
print
(
aa
.
pwd_Encrypt
())
data/mdm3-ea/data
View file @
65aaa304
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
"queryAlCompanyRegistInfo_url": "/test2api/mdmService/companyRegistBill/queryAlCompanyRegistInfo"
"queryAlCompanyRegistInfo_url": "/test2api/mdmService/companyRegistBill/queryAlCompanyRegistInfo"
"upCompanyList_url": "/test2api/mdmService/mdmCompany/upCompanyList"
"upCompanyList_url": "/test2api/mdmService/mdmCompany/upCompanyList"
"auditCompanyRegistBill_url": "/test2api/mdmService/companyRegistBill/auditCompanyRegistBill"
"auditCompanyRegistBill_url": "/test2api/mdmService/companyRegistBill/auditCompanyRegistBill"
"updateByIdCompanyRegistBill_url": "/test2api/mdmService/companyRegistBill/updateById"
"username": "1679886114521"
"username": "1679886114521"
"password": "a123456!"
"password": "a123456!"
...
@@ -50,6 +51,11 @@ json_headers2: {
...
@@ -50,6 +51,11 @@ json_headers2: {
"id": "%s"
"id": "%s"
}
}
"payload6": {
"id": "%s",
"isLocked": 0,
"auditStatus": "30"
}
#企业注册接口-器械注册人-正常注册-所有输入项填写
#企业注册接口-器械注册人-正常注册-所有输入项填写
"payload": {
"payload": {
...
@@ -182,5 +188,5 @@ json_headers2: {
...
@@ -182,5 +188,5 @@ json_headers2: {
"name1": "国药集团公司"
"name1": "国药集团公司"
checkDict: {"code": 0,'msg': None,'data':1}
checkDict: {"code": 0,'msg': None,'data':1}
checkDict1: {"code": 0,'msg': None,'data':'审核通过'}
checkDict1: {"code": 0,'msg': None,'data':'审核通过'}
checkDict2: {"code": 0,'msg': None,'data':1}
data/mdm3-hs/data
View file @
65aaa304
"insertHosRegistInfo_url": "/test2api/mdmService/companyRegistBill/insertHosRegistInfo"
"insertHosRegistInfo_url": "/test2api/mdmService/companyRegistBill/insertHosRegistInfo"
\ No newline at end of file
json_contentType: "application/json"
json_headers: {
"Content-Type": "%s"
}
"payload": {
"hosProperty": "1",
"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": ""
}
"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": ""
}
"name1": "湖南省人民医院"
checkDict: {"code": 0,'msg': None,'data':1}
\ No newline at end of file
report/summary.html
View file @
65aaa304
...
@@ -54,9 +54,9 @@
...
@@ -54,9 +54,9 @@
</tr>
</tr>
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
2
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
2
</td>
<td
class=
'details-col-elapsed'
>
0分
1
秒
</td>
<td
class=
'details-col-elapsed'
>
0分
0
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
</tr>
</table>
</table>
...
@@ -72,9 +72,16 @@
...
@@ -72,9 +72,16 @@
</tr>
</tr>
<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.519
</td>
<td
class=
"details-col-elapsed"
>
0.233
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/医院注册_正常注册_私立医院/log.html'
target=
'_blank'
>
医院注册_正常注册_私立医院
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
0.113
</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