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
8d00d758
Commit
8d00d758
authored
Dec 20, 2023
by
xiao-hesheng
Browse files
增加配送模块脚本
parent
b0e36621
Changes
5
Hide whitespace changes
Inline
Side-by-side
air_case/a6_mdm3_dp/a5_4配送单
查询
_全部.air/a5_4配送单
查询
_全部.py
→
air_case/a6_mdm3_dp/a5_4配送单
列表
_全部.air/a5_4配送单
列表
_全部.py
View file @
8d00d758
...
@@ -4,7 +4,7 @@ from common.fileUtls import FileUtils
...
@@ -4,7 +4,7 @@ from common.fileUtls import FileUtils
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web,a5_4配送单
查询
_全部,id2291,id2291-18,sit,on
case_tag:api,mdm-web,a5_4配送单
列表
_全部,id2291,id2291-18,sit,on
主数据平台:a5_4配送单查询_全部
主数据平台:a5_4配送单查询_全部
"""
"""
...
...
air_case/a6_mdm3_dp/a5_6配送单查询_已完成.air/a5_6配送单查询_已完成.py
deleted
100644 → 0
View file @
b0e36621
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web,a5_6配送单查询_已完成,id2291,id2291-20,sit,on
主数据平台:a5_6配送单查询_已完成
"""
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\\a1企业登录.air'
)
using
(
pro_path
+
r
'\\air_case\\a6_mdm3_dp\\a1企业登录.air'
)
from
a1企业登录
import
e_login
token
,
projectCode
,
uxid
,
corpId
,
e_name
=
e_login
()
"""
场景:a5_5配送单查询_待验收
用例名称:a5_5配送单查询_待验收
输入:无
输出:"rtn_msg": 0
"""
module
=
"a6_mdm3_dp"
#a1订单配送列表数据查询_全部
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"distr_page_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
,
"payload7_2"
)
# 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
>=
1
:
commonFuc
().
check_text_exist
(
code
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
select1
()
air_case/a6_mdm3_dp/a5_7配送单查询_已作废.air/a5_7配送单查询_已作废.py
deleted
100644 → 0
View file @
b0e36621
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web,a5_7配送单查询_已作废,id2291,id2291-21,sit,on
主数据平台:a5_7配送单查询_已作废
"""
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\\a1企业登录.air'
)
using
(
pro_path
+
r
'\\air_case\\a6_mdm3_dp\\a1企业登录.air'
)
from
a1企业登录
import
e_login
token
,
projectCode
,
uxid
,
corpId
,
e_name
=
e_login
()
"""
场景:a5_7配送单查询_已作废
用例名称:a5_7配送单查询_已作废
输入:无
输出:"rtn_msg": 0
"""
module
=
"a6_mdm3_dp"
#a1订单配送列表数据查询_全部
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"distr_page_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
,
"payload7_3"
)
# 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
>=
1
:
commonFuc
().
check_text_exist
(
code
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
select1
()
air_case/a6_mdm3_dp/a5_
5
配送单查询_
待验收
.air/a5_
5
配送单查询_
待验收
.py
→
air_case/a6_mdm3_dp/a5_
8
配送单查询_
全部
.air/a5_
8
配送单查询_
全部
.py
View file @
8d00d758
...
@@ -4,8 +4,8 @@ from common.fileUtls import FileUtils
...
@@ -4,8 +4,8 @@ from common.fileUtls import FileUtils
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
case_tag:api,mdm-web,a5_
5
配送单查询_
待验收
,id2291,id2291-
19
,sit,on
case_tag:api,mdm-web,a5_
8
配送单查询_
全部
,id2291,id2291-
22
,sit,on
主数据平台:a5_
5
配送单查询_
待验收
主数据平台:a5_
8
配送单查询_
全部
"""
"""
from
common.common_func
import
commonFuc
from
common.common_func
import
commonFuc
...
@@ -20,8 +20,8 @@ def select1():
...
@@ -20,8 +20,8 @@ def select1():
token
,
projectCode
,
uxid
,
corpId
,
e_name
=
e_login
()
token
,
projectCode
,
uxid
,
corpId
,
e_name
=
e_login
()
"""
"""
场景:a5_
5
配送单查询_
待验收
场景:a5_
4
配送单查询_
全部
用例名称:a5_
5
配送单查询_
待验收
用例名称:a5_
4
配送单查询_
全部
输入:无
输入:无
输出:"rtn_msg": 0
输出:"rtn_msg": 0
"""
"""
...
@@ -32,7 +32,7 @@ def select1():
...
@@ -32,7 +32,7 @@ def select1():
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
projectCode
)
projectCode
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload7
_1
"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload7"
)
# print('request_body',request_body)
# print('request_body',request_body)
# 发送请求
# 发送请求
...
...
report/summary.html
View file @
8d00d758
...
@@ -72,9 +72,9 @@
...
@@ -72,9 +72,9 @@
</tr>
</tr>
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a5_7配送单
查询
_已作废/log.html'
target=
'_blank'
>
a5_7配送单
查询
_已作废
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a5_7配送单
列表
_已作废/log.html'
target=
'_blank'
>
a5_7配送单
列表
_已作废
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
3.5
67
</td>
<td
class=
"details-col-elapsed"
>
3.5
93
</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