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
ee6213cb
Commit
ee6213cb
authored
Apr 02, 2024
by
xiao-hesheng
Browse files
新增带量采购目录脚本
parent
81e8545d
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/b3_herp3_purchase/a_n6_手术通知单_列表查询_条件查询__异常查询_制单时间.air/a_n6_手术通知单_列表查询_条件查询__异常查询_制单时间.py
0 → 100644
View file @
ee6213cb
# -*- encoding=utf8 -*-
from
common.db.sql.sql_del_branch_info
import
delData
from
common.fileUtls
import
FileUtils
from
common.timeUtils
import
timeUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,herp-web,a_n6_手术通知单_列表查询_条件查询__异常查询_制单时间,id2297,id2297-136,sit,on
内网:a_n6_手术通知单_列表查询_条件查询__异常查询_制单时间
"""
from
common.common_func
import
commonFuc
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
airtest.core.api
import
using
import
sys
def
test1
():
module
=
"b3_herp3_purchase"
"""
场景:a_n6_手术通知单_列表查询_条件查询__异常查询_制单时间
用例名称:a_n6_手术通知单_列表查询_条件查询__异常查询_制单时间
输入:无
输出:"rtn_msg": {"code": 0, "msg": null, "data": true}
"""
# 内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_operationNotice_url"
)
print
(
url
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
print
(
'headers'
,
headers
)
# 从文件中获取院区id
branchId
=
commonFuc
().
get_business_data
(
module
,
'branchId'
)
# # #获取日期
date1
=
timeUtils
().
get_time_hms
(
5
)
date2
=
timeUtils
().
get_time_add
(
-
180
,
2
)
# print(date1,date2)
# 从文件中获取手术申请单号
info
=
FileUtils
().
r_info8
(
module
,
"手术通知单信息"
,
'message8'
)
# print('info', info)
list_a
=
info
[
'list_a'
]
# print('list_a', list_a)
orderNo
=
'orderNo'
sourceOrderNo
=
'sourceOrderNo'
provName
=
'provName'
for
i
in
list_a
:
orderNo
=
i
[
'orderNo'
]
sourceOrderNo
=
i
[
'sourceOrderNo'
]
provName
=
i
[
'provName'
]
break
##请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload23_3"
,
orderNo
,
provName
,
sourceOrderNo
,
date1
,
date2
,
branchId
)
print
(
'request_body'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
if
code
==
0
and
total
==
0
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
test1
()
report/summary.html
View file @
ee6213cb
...
...
@@ -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分
2
秒
</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_n
5
_手术通知单_列表查询_条件查询_异常查询_
进院供应商
/log.html'
target=
'_blank'
>
a_n
5
_手术通知单_列表查询_条件查询_异常查询_
进院供应商
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a_n
6
_手术通知单_列表查询_条件查询_
_
异常查询_
制单时间
/log.html'
target=
'_blank'
>
a_n
6
_手术通知单_列表查询_条件查询_
_
异常查询_
制单时间
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
2.228
</td>
<td
class=
"details-col-elapsed"
>
1.493
</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