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
2772d0fe
Commit
2772d0fe
authored
Aug 03, 2023
by
xiao-hesheng
Browse files
新增spd3.0外网注册企业接口测试脚本
parent
f96691e9
Changes
7
Hide whitespace changes
Inline
Side-by-side
air_case/spd3/外网企业注册-器械注册人.air/外网企业注册-器械注册人.py
0 → 100644
View file @
2772d0fe
# -*- encoding=utf8 -*-
__author__
=
"xiaohesheng"
"""
case_tag:mdm-web,用例集id2226
主数据平台:注册企业接口
"""
from
common.common_func
import
commonFuc
import
time
module
=
"spd3"
#企业注册接口
import
os
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"CompanyRegist_url"
)
print
(
url
)
# #获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
))
print
(
headers
)
name
=
commonFuc
().
get_business_data
(
module
,
"name"
)
#获取前缀name
cname
=
name
+
commonFuc
().
randomString
(
5
)
#随机数生成拼接企业名称
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload"
,
cname
,
cname
,
cname
,
cname
,
cname
)
print
(
request_body
)
"""
场景:外网主数据平台企业注册-器械注册人注册接口-正常注册
用例名称:企业注册接口-器械注册人-正常注册
输入:cname
输出:"rtn_msg": "返回注册企业信息"
"""
#发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
result
)
#获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict"
)
# commonFuc().check_result(check_dict, result)
\ No newline at end of file
air_case/spd3/登录外网系统.air/登录外网系统.py
View file @
2772d0fe
...
@@ -15,6 +15,7 @@ module = "spd3"
...
@@ -15,6 +15,7 @@ module = "spd3"
import
os
import
os
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"VerifyCode_url"
)
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"VerifyCode_url"
)
print
(
"aaaaaaaaaaaaaaaaaa"
+
url
)
print
(
"aaaaaaaaaaaaaaaaaa"
+
url
)
# token = commonFuc().get_token(module, "cancel_enc_user_id")
# token = commonFuc().get_token(module, "cancel_enc_user_id")
# timestamp = str(int(time.time()))
# timestamp = str(int(time.time()))
# payload = commonFuc().get_business_data(module, "payload")
# payload = commonFuc().get_business_data(module, "payload")
...
...
data/spd3.0/data
deleted
100644 → 0
View file @
f96691e9
# 登录外网(主数据平台)系统
"VerifyCode_url": "/test2api/oauthService/auth/getVerifyCode"
login_data: {"orderCode": "10200512100243412"}
login_contentType: "application/json"
login_checkDict: {"rtn_code": "0000001"}
"login_enc_user_id": "国药集团湖北分公司mQDwR7"
"login_url": "/test2api/oauthService/auth/getVerifyCode"
\ No newline at end of file
data/spd3.0/message
deleted
100644 → 0
View file @
f96691e9
data/spd3.0/sql
deleted
100644 → 0
View file @
f96691e9
# 存储业务sql
"select_patient":
- medical
- SELECT relation_id,name,gender,id FROM `patient` where enc_user_id=%s and deleted=0;
data/spd3/data
View file @
2772d0fe
...
@@ -6,4 +6,41 @@ login_checkDict: {"rtn_code": "0000001"}
...
@@ -6,4 +6,41 @@ login_checkDict: {"rtn_code": "0000001"}
"login_enc_user_id": "国药集团湖北分公司mQDwR7"
"login_enc_user_id": "国药集团湖北分公司mQDwR7"
"login_url": "/test2api/oauthService/auth/getVerifyCode"
"login_url": "/test2api/oauthService/auth/getVerifyCode"
\ No newline at end of file
#器械注册人接口
"CompanyRegist_url": "/test2api/mdmService/companyRegistBill/insertCompanyRegist"
json_contentType: "application/json"
json_headers: {
"Content-Type": "%s"
}
"payload": {
'compFunction': 2,
"compFunctionArr": ["2"],
"cname": "%s",
"shortName": "",
"isAbroad": "1",
"addrCodeList": [
"11"
],
"area": "",
"userName": "%s",
"address": "",
"userLoginCode": "%s",
"userLoginPsw": "a123456!",
"confimPassword": "a123456!",
"registContactUser": "",
"registContactWay": "",
"email": "%s@sina.com",
"registSourceProject": "%s",
"legal": "",
"erpCode": "002",
"dataEntrance": "注册",
"compKind": "0",
"upCompanyId": "",
"companyRegistBizscopeVos": [],
"certVOList": []
}
name:"国药集团公司"
checkDict: {"code": 0}
report/summary.html
View file @
2772d0fe
...
@@ -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"
>
0.
13
9
</td>
<td
class=
"details-col-elapsed"
>
0.
28
9
</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