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
3c3dfc02
Commit
3c3dfc02
authored
Dec 22, 2023
by
xiao-hesheng
Browse files
增加配送模块脚本
parent
9c6807c6
Changes
4
Hide whitespace changes
Inline
Side-by-side
air_case/a6_mdm3_dp/a8_2配送单转换_全部.air/a8_2配送单转换_全部.py
View file @
3c3dfc02
...
@@ -42,8 +42,14 @@ def select1():
...
@@ -42,8 +42,14 @@ def select1():
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
total
=
commonFuc
().
analysis_json
(
'total'
,
data
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
data
)
if
code
==
0
and
total
>=
1
:
if
code
==
0
and
total
>=
1
:
commonFuc
().
check_text_exist
(
code
,
result
)
id1
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
0
])
print
(
id1
)
id2
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
1
])
print
(
id2
)
commonFuc
().
check_text_exist
(
code
,
result
)
return
id1
,
id2
else
:
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
commonFuc
().
check_text_exist
(
'error'
,
result
)
select1
()
select1
()
...
...
air_case/a6_mdm3_dp/a8_3配送单转换_确认_.air/a8_3配送单转换_确认_.py
0 → 100644
View file @
3c3dfc02
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web,a8_3配送单转换_确认_,id2291,id2291-46,sit,on
主数据平台:a8_3配送单转换_确认_
"""
from
common.common_func
import
commonFuc
from
airtest.core.api
import
using
import
sys
module
=
"a6_mdm3_dp"
def
select1
():
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\a6_mdm3_dp\\a8_2企业登录.air'
)
using
(
pro_path
+
r
'\\air_case\\a6_mdm3_dp\\a8_2企业登录.air'
)
from
a8_2企业登录
import
e_login
token
,
projectCode
,
uxid
,
corpId
,
e_name
=
e_login
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\a6_mdm3_dp\\a8_2配送单转换_全部.air'
)
using
(
pro_path
+
r
'\\air_case\\a6_mdm3_dp\\a8_2配送单转换_全部.air'
)
from
a8_2配送单转换_全部
import
select1
id1
,
id2
=
select1
()
"""
场景:a8_2配送单转换_全部
用例名称:a8_2配送单转换_全部
输入:无
输出:"rtn_msg": 0
"""
module
=
"a6_mdm3_dp"
#a1订单配送列表数据查询_全部
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"trans_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
,
"payload9_7"
,
id1
,
uxid
)
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
)
if
code
==
0
:
commonFuc
().
check_text_exist
(
code
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
select1
()
data/a6_mdm3_dp/data
View file @
3c3dfc02
...
@@ -7,7 +7,8 @@
...
@@ -7,7 +7,8 @@
"return_detail_url": "/test2api/hdiFusion/bill/return/detail"
"return_detail_url": "/test2api/hdiFusion/bill/return/detail"
"return_submit": "/test2api/hdiFusion/bill/distr/return/submit"
"return_submit": "/test2api/hdiFusion/bill/distr/return/submit"
"distr_page_url": "/test2api/hdiFusion/bill/distr/page"
"distr_page_url": "/test2api/hdiFusion/bill/distr/page"
"detail_url": /test2api/hdiFusion/bill/purchase/detail/
"detail_url": "/test2api/hdiFusion/bill/purchase/detail/"
"trans_url": "/test2api/hdiFusion/bill/distr/trans"
"username": "001f90380"
"username": "001f90380"
"password": "1qaz!QAZ"
"password": "1qaz!QAZ"
...
@@ -93,7 +94,9 @@ json_headers2: {
...
@@ -93,7 +94,9 @@ json_headers2: {
"payload9_3": {"id":"","purBillId":"%s","sourceId":"%s","sourceVersion":"%s","version":0,"billMode":"66","hosVersion":2,"createUser":"GYQX-SPD:user-19669","createUserName":"浙江高仰医疗","lastModifiedUser":"GYQX-SPD:user-19669","detailList":[{"sourceDetailId":"%s","hosGoodsId":"h0028|hosGood-880444","mdmGoodsCode":null,"goodsCode":"880444","certificateCode":"京械注准203420915218","pkgDefId":"h0028000217","provGoodsId":"provGood-1939432","replPkgQty":6,"settlement":0,"batchCode":"1","productDate":"2023-12-01","expdtDate":"2023-12-31","distrPkgQty":1,"disabledFlag":0,"distrQty":10,"ext":{"ygptCode":"","transCond":"0-15℃","storageCond":"0-30℃","erpCode":"11658060"},"edit":true,"barcodeList":[],"viewId":"%sROW0"}]}
"payload9_3": {"id":"","purBillId":"%s","sourceId":"%s","sourceVersion":"%s","version":0,"billMode":"66","hosVersion":2,"createUser":"GYQX-SPD:user-19669","createUserName":"浙江高仰医疗","lastModifiedUser":"GYQX-SPD:user-19669","detailList":[{"sourceDetailId":"%s","hosGoodsId":"h0028|hosGood-880444","mdmGoodsCode":null,"goodsCode":"880444","certificateCode":"京械注准203420915218","pkgDefId":"h0028000217","provGoodsId":"provGood-1939432","replPkgQty":6,"settlement":0,"batchCode":"1","productDate":"2023-12-01","expdtDate":"2023-12-31","distrPkgQty":1,"disabledFlag":0,"distrQty":10,"ext":{"ygptCode":"","transCond":"0-15℃","storageCond":"0-30℃","erpCode":"11658060"},"edit":true,"barcodeList":[],"viewId":"%sROW0"}]}
"payload9_4": {"pageNum":1,"pageSize":50,"orderBy":"last_modified desc, order_no desc","queryObject":{"dateValue":["",""],"provId":"p10d95","pageType":2,"hosIdList":["h0347","h0028"],"tabIdx":"3","startDate":"","endDate":""}}
"payload9_4": {"pageNum":1,"pageSize":50,"orderBy":"last_modified desc, order_no desc","queryObject":{"dateValue":["",""],"provId":"p10d95","pageType":2,"hosIdList":["h0347","h0028"],"tabIdx":"3","startDate":"","endDate":""}}
"payload9_5": {"pageNum":1,"pageSize":50,"orderBy":"create_time desc","queryObject":{"dateValue":["",""],"provId":"p10d95","pageType":2,"hosIdList":["h0347","h0028"],"tabIdx":"1","startDate":"","endDate":""}}
"payload9_5": {"pageNum":1,"pageSize":50,"orderBy":"create_time desc","queryObject":{"dateValue":["",""],"provId":"p10d95","pageType":2,"hosIdList":["h0347","h0028"],"tabIdx":"1","startDate":"","endDate":""}}
"payload9_6": {"pageNum":1,"pageSize":50,"orderBy":"create_time desc","queryObject":{"orderNo":"","planOrderNo":"","hosId":"h0347","exeProvName":"","billMode":"","dateValue":[],"provId":"p10d95","convertFlag":0,"startDate":"","endDate":""}}
"payload9_6": {"pageNum":1,"pageSize":50,"orderBy":"create_time desc","queryObject":{"orderNo":"","planOrderNo":"","hosId":"","exeProvName":"","billMode":"","dateValue":[],"provId":"p00002e79","hosIdList":["h0347"],"convertFlag":0,"startDate":"","endDate":""}}
"payload9_7": {"id":"%s","version":1,"hosVersion":3,"detailList":[],"userId":"%s"}
checkDict: {'code': 0, 'msg': None, 'tag': None, 'data': 0}
checkDict: {'code': 0, 'msg': None, 'tag': None, 'data': 0}
checkDict1: {'code': 1100000, 'msg': '暂时没有定义异码,中文描述为:审核失败', 'tag': '/mdmService:gyqx.spd.mdm.access.service.impl.Supply
checkDict1: {'code': 1100000, 'msg': '暂时没有定义异码,中文描述为:审核失败', 'tag': '/mdmService:gyqx.spd.mdm.access.service.impl.Supply
...
...
report/summary.html
View file @
3c3dfc02
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分
4
秒
</td>
<td
class=
'details-col-elapsed'
>
0分
7
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
</tr>
</table>
</table>
...
@@ -72,9 +72,9 @@
...
@@ -72,9 +72,9 @@
</tr>
</tr>
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a8_
2
配送单转换_
全部
/log.html'
target=
'_blank'
>
a8_
2
配送单转换_
全部
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a8_
3
配送单转换_
确认_
/log.html'
target=
'_blank'
>
a8_
3
配送单转换_
确认_
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
4.171
</td>
<td
class=
"details-col-elapsed"
>
7.224
</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