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
38dedc40
Commit
38dedc40
authored
Sep 27, 2023
by
xiao-hesheng
Browse files
供销关系申请查询,驳回
parent
ed2eb0d8
Changes
8
Hide whitespace changes
Inline
Side-by-side
air_case/mdm3_cm/a10供货关系审核_驳回_客户类型_医院_医院账号登录.air/a10供货关系审核_驳回_客户类型_医院_医院账号登录.py
0 → 100644
View file @
38dedc40
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web,a10供货关系审核_驳回_客户类型_医院_医院账号登录,id2255,id2255-10,sit,on
主数据平台:a10供货关系审核_驳回_客户类型_医院_医院账号登录
"""
from
common.common_func
import
commonFuc
from
air_case.mdm_login.登录外网系统.登录外网系统
import
login_system
from
airtest.core.api
import
using
import
sys
module
=
"mdm3_cm"
def
h_login
():
module
=
"mdm3_cm"
info
=
FileUtils
().
r_info
(
"mdm3_cm"
,
"供货关系申请"
)
print
(
info
)
e_corpId
=
info
[
'e_corpId'
]
h_corpId
=
info
[
'h_corpId'
]
e_username
=
info
[
'e_username'
]
h_name
=
info
[
'h_name'
]
"""
场景:a10供货关系审核_驳回_客户类型_医院_医院账号登录
用例名称:a10供货关系审核_驳回_客户类型_医院_医院账号登录
输入:用户名,密码
输出:"rtn_msg": token
"""
# module = "mdm3_cm"
#a10供货关系审核_驳回_客户类型_医院_医院账号登录
username
=
h_name
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password)
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
return
token
,
projectCode
,
uxid
,
corpId
,
h_name
h_login
()
air_case/mdm3_cm/a11供货关系审核_驳回_客户类型_医院_供销关系审核_查询待审核数据1.air/a11供货关系审核_驳回_客户类型_医院_供销关系审核_查询待审核数据1.py
0 → 100644
View file @
38dedc40
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web,a11供货关系审核_驳回_客户类型_医院_供销关系审核_查询待审核数据1,id2255,id2255-11,sit,on
主数据平台:a11供货关系审核_驳回_客户类型_医院_供销关系审核_查询待审核数据1
"""
from
common.common_func
import
commonFuc
from
air_case.mdm_login.登录外网系统.登录外网系统
import
login_system
from
airtest.core.api
import
using
import
sys
module
=
"mdm3_cm"
def
select_delay_approve_data
():
module
=
"mdm3_cm"
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\mdm3_cm\\a10供货关系审核_驳回_客户类型_医院_医院账号登录.air'
)
using
(
pro_path
+
r
'\\air_case\\mdm3_cm\\a10供货关系审核_驳回_客户类型_医院_医院账号登录.air'
)
from
a10供货关系审核_驳回_客户类型_医院_医院账号登录
import
h_login
token
,
projectCode
,
uxid
,
corpId
,
h_name
=
h_login
()
print
(
token
,
projectCode
,
uxid
,
corpId
,
h_name
)
"""
场景:a11供货关系审核_驳回_客户类型_医院_供销关系审核_查询待审核数据1
用例名称:a11供货关系审核_驳回_客户类型_医院_供销关系审核_查询待审核数据1
输入:医院id
输出:"rtn_msg": data
"""
#a11供货关系审核_驳回_客户类型_医院_供销关系审核_查询待审核数据1
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
,
"payload6"
,
corpId
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
select_delay_approve_data
()
air_case/mdm3_cm/a12供货关系审核_驳回_客户类型_医院_供销关系审核_驳回.air/a12供货关系审核_驳回_客户类型_医院_供销关系审核_驳回.py
0 → 100644
View file @
38dedc40
air_case/mdm3_cm/a1供货关系申请_客户类型_医院_登录_医院登录获取医院id.air/a1供货关系申请_客户类型_医院_登录_医院登录获取医院id.py
View file @
38dedc40
...
...
@@ -22,9 +22,10 @@ def h_login():
场景:a1供货关系申请_客户类型_医院_登录_医院登录获取医院id
用例名称:a1供货关系申请_客户类型_医院_登录_医院登录获取医院id
输入:用户名,密码
输出:"rtn_msg": token
输出:"rtn_msg": token
,projectCode,uxid,corpId,h_name
"""
#供货关系申请_客户类型_医院_登录_医院登录获取医院id
#如果需要h0347账号登录,这里就从文件获取
username
=
h_name
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
...
...
air_case/mdm3_cm/a8供货关系申请_客户类型_医院_供销关系申请提交_已存在的供销关系.air/a8供货关系申请_客户类型_医院_供销关系申请提交_已存在的供销关系.py
0 → 100644
View file @
38dedc40
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web,a8供货关系申请_客户类型_医院_供销关系申请提交_已存在的供销关系,id2255,id2255-8,sit,on
主数据平台:a8供货关系申请_客户类型_医院_供销关系申请提交_已存在的供销关系
"""
from
common.common_func
import
commonFuc
from
air_case.mdm_login.登录外网系统.登录外网系统
import
login_system
from
airtest.core.api
import
using
import
sys
module
=
"mdm3_cm"
def
supply_and_marketing_apply
():
module
=
"mdm3_cm"
info
=
FileUtils
().
r_info
(
"mdm3_cm"
,
"供货关系申请"
)
print
(
info
)
e_corpId
=
info
[
'e_corpId'
]
h_corpId
=
info
[
'h_corpId'
]
e_username
=
info
[
'e_username'
]
h_name
=
info
[
'h_name'
]
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
e_username
,
commonFuc
().
get_business_data
(
module
,
'password'
)).
get_token
()
print
(
token
,
projectCode
,
uxid
,
corpId
,
info
)
"""
场景:a8供货关系申请_客户类型_医院_供销关系申请提交_已存在的供销关系
用例名称:a8供货关系申请_客户类型_医院_供销关系申请提交_已存在的供销关系
输入:h_corpId,contactUser,contactWay
输出:"rtn_msg": ok
"""
# module = "mdm3_cm"
#a3供货关系申请_客户类型_医院_供销关系申请提交
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"submitSupplyRelation_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
projectCode
)
contactUser
=
commonFuc
().
randomString
(
5
)
contactWay
=
contactUser
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload"
,
h_corpId
,
contactUser
,
contactWay
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #获取接口返回数据
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict1"
)
commonFuc
().
check_result
(
check_dict
,
result
)
e_corpId
=
corpId
e_username
=
e_username
return
e_corpId
,
h_corpId
,
e_username
,
h_name
supply_and_marketing_apply
()
# FileUtils().w_info1(supply_and_marketing_apply(),module,'供货关系申请')
\ No newline at end of file
air_case/mdm3_cm/a9供货关系申请_客户类型_医院_供销关系编辑.air/a9供货关系申请_客户类型_医院_供销关系编辑.py
0 → 100644
View file @
38dedc40
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web,a9供货关系申请_客户类型_医院_供销关系编辑,id2255,id2255-9,sit,on
主数据平台:a9供货关系申请_客户类型_医院_供销关系编辑
"""
from
common.common_func
import
commonFuc
from
air_case.mdm_login.登录外网系统.登录外网系统
import
login_system
from
airtest.core.api
import
using
import
sys
module
=
"mdm3_cm"
def
supply_and_marketing_edit
():
module
=
"mdm3_cm"
info
=
FileUtils
().
r_info
(
"mdm3_cm"
,
"供货关系申请"
)
print
(
info
)
e_corpId
=
info
[
'e_corpId'
]
h_corpId
=
info
[
'h_corpId'
]
e_username
=
info
[
'e_username'
]
h_name
=
info
[
'h_name'
]
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
e_username
,
commonFuc
().
get_business_data
(
module
,
'password'
)).
get_token
()
print
(
token
,
projectCode
,
uxid
,
corpId
,
info
)
"""
场景:a9供货关系申请_客户类型_医院_供销关系编辑
用例名称:a9供货关系申请_客户类型_医院_供销关系编辑
输入:h_corpId,contactUser,contactWay
输出:"rtn_msg": ok
"""
# module = "mdm3_cm"
#a3供货关系申请_客户类型_医院_供销关系申请提交
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"editSupplyRelation_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
projectCode
)
contactUser
=
commonFuc
().
randomString
(
5
)
contactWay
=
contactUser
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload5"
,
h_corpId
,
contactUser
,
contactWay
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# #获取接口返回数据
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict2"
)
commonFuc
().
check_result
(
check_dict
,
result
)
e_corpId
=
corpId
e_username
=
e_username
return
e_corpId
,
h_corpId
,
e_username
,
h_name
supply_and_marketing_edit
()
data/mdm3_cm/data
View file @
38dedc40
...
...
@@ -3,6 +3,7 @@
"submitSupplyRelation_url": "/test2api/mdmService/supplyRelation/submitSupplyRelation/"
"listVoPage_url": "/test2api/mdmService/supplyRelation/listVoPage/"
"editSupplyRelation_url": "/test2api/mdmService/supplyRelation/editSupplyRelation/"
json_contentType: "application/json"
json_headers: {
"Content-Type": "%s"
...
...
@@ -71,4 +72,29 @@ json_headers2: {
},
"orderBy": "sr.create_time desc"
}
checkDict: {"code": 0,'msg': None,'data':1}
\ No newline at end of file
"payload5": {
"id": "",
"provName": "",
"hosName": "",
"invitationCode": "",
"hosId": "%s",
"clientType": "1",
"provId": "",
"contactUser": "%s",
"contactWay": "%s",
"version": ""
}
"payload6": {
"pageNum": 1,
"pageSize": 10,
"queryObject": {
"provName": "",
"clientType": "",
"tbStatus": 10,
"hosId": "%s"
},
"orderBy": "sr.create_time desc"
}
checkDict: {"code": 0,'msg': None,'data':1}
checkDict1: {"code": 400,'msg': '供销关系已存在!请勿重复添加','data':None}
checkDict2: {"code": 400,'msg': None,'data':None}
\ No newline at end of file
report/summary.html
View file @
38dedc40
...
...
@@ -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/a
7
供货关系
申请
_客户类型_医院_
分页查询分页查询供货申请单4
/log.html'
target=
'_blank'
>
a
7
供货关系
申请
_客户类型_医院_
分页查询分页查询供货申请单4
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a
11
供货关系
审核_驳回
_客户类型_医院_
供销关系审核_查询待审核数据1
/log.html'
target=
'_blank'
>
a
11
供货关系
审核_驳回
_客户类型_医院_
供销关系审核_查询待审核数据1
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
0.691
</td>
<td
class=
"details-col-elapsed"
>
1.074
</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