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
6c8a653f
Commit
6c8a653f
authored
Mar 12, 2024
by
xiao-hesheng
Browse files
新增采购计划模块脚本
parent
eeaca1ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
air_case/a6_mdm3_dp/a1订单配送列表数据查询_待确认查询3医院.air/a1订单配送列表数据查询_待确认查询3医院.py
View file @
6c8a653f
...
...
@@ -2,6 +2,7 @@
from
common.fileUtls
import
FileUtils
from
common.run_cmd_script
import
execute_command
import
time
__author__
=
"xiaohesheng"
"""
...
...
@@ -12,9 +13,11 @@ case_tag:api,mdm-web,a1订单配送列表数据查询_待确认查询3.0医院,i
from
common.common_func
import
commonFuc
from
airtest.core.api
import
using
import
sys
module
=
"a6_mdm3_dp"
def
select1
():
def
select1
():
execute_command
(
"python runner.py tag id2297-10,id2263-80 debug sit"
)
execute_command
(
"python runner.py tag id2297-10,id2263-80 debug sit"
)
execute_command
(
"python runner.py tag id2297-10,id2263-80 debug sit"
)
...
...
@@ -38,7 +41,7 @@ def select1():
输出:"rtn_msg": 0
"""
module
=
"a6_mdm3_dp"
#a1订单配送列表数据查询_全部
#
a1订单配送列表数据查询_全部
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"purchase_page_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
...
...
@@ -50,30 +53,31 @@ def select1():
# 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
)
while
True
:
if
total
>=
3
:
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
total
>=
3
:
break
else
:
time
.
sleep
(
6
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
data
)
if
code
==
0
and
total
>=
1
:
id1
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
0
])
if
code
==
0
and
total
>=
1
:
id1
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
0
])
print
(
id1
)
global_var_cname
=
id1
id2
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
1
])
id2
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
1
])
print
(
id2
)
global_var_cname
=
id2
commonFuc
().
check_text_exist
(
code
,
result
)
return
id1
,
id2
commonFuc
().
check_text_exist
(
code
,
result
)
return
id1
,
id2
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
select1
()
select1
()
common/run_cmd_script.py
View file @
6c8a653f
...
...
@@ -28,4 +28,4 @@ def execute_command(command):
# command="python runner.py tag id2297-10 debug sit"
# print(command)
os
.
system
(
command
)
execute_command
(
"python runner.py tag id2297-10,id2263-80 debug sit"
)
#
execute_command("python runner.py tag id2297-10,id2263-80 debug sit")
report/summary.html
View file @
6c8a653f
...
...
@@ -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'
>
1分1
0
秒
</td>
<td
class=
'details-col-elapsed'
>
1分1
4
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
</table>
...
...
@@ -74,7 +74,7 @@
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a1订单配送列表数据查询_待确认查询3医院/log.html'
target=
'_blank'
>
a1订单配送列表数据查询_待确认查询3医院
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
7
0.779
</td>
<td
class=
"details-col-elapsed"
>
7
4.843
</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