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
eeaca1ac
Commit
eeaca1ac
authored
Mar 12, 2024
by
xiao-hesheng
Browse files
新增采购计划模块脚本
parent
fe5cccea
Changes
4
Hide whitespace changes
Inline
Side-by-side
air_case/a6_mdm3_dp/a1企业登录.air/a1企业登录.py
View file @
eeaca1ac
...
@@ -34,7 +34,7 @@ def e_login():
...
@@ -34,7 +34,7 @@ def e_login():
username
=
commonFuc
().
get_business_data
(
module
,
'username'
)
username
=
commonFuc
().
get_business_data
(
module
,
'username'
)
# print('医院名称',username)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
#
print(username, password)
print
(
username
,
password
)
# 获取token和projectCode
# 获取token和projectCode
while
True
:
while
True
:
try
:
try
:
...
...
air_case/a6_mdm3_dp/a1订单配送列表数据查询_待确认查询3医院.air/a1订单配送列表数据查询_待确认查询3医院.py
View file @
eeaca1ac
# -*- encoding=utf8 -*-
# -*- encoding=utf8 -*-
from
common.fileUtls
import
FileUtils
from
common.fileUtls
import
FileUtils
from
common.run_cmd_script
import
execute_command
import
time
__author__
=
"xiaohesheng"
__author__
=
"xiaohesheng"
"""
"""
...
@@ -13,6 +14,13 @@ from airtest.core.api import using
...
@@ -13,6 +14,13 @@ from airtest.core.api import using
import
sys
import
sys
module
=
"a6_mdm3_dp"
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"
)
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"
)
pro_path
=
commonFuc
().
get_pro_path
()
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\a6_mdm3_dp\\a1企业登录.air'
)
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\a6_mdm3_dp\\a1企业登录.air'
)
using
(
pro_path
+
r
'\\air_case\\a6_mdm3_dp\\a1企业登录.air'
)
using
(
pro_path
+
r
'\\air_case\\a6_mdm3_dp\\a1企业登录.air'
)
...
@@ -48,6 +56,12 @@ def select1():
...
@@ -48,6 +56,12 @@ 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
)
while
True
:
if
total
>=
3
:
break
else
:
time
.
sleep
(
6
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
data
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
data
)
if
code
==
0
and
total
>=
1
:
if
code
==
0
and
total
>=
1
:
id1
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
0
])
id1
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
0
])
...
...
common/run_cmd_script.py
0 → 100644
View file @
eeaca1ac
import
os
from
common.common_func
import
commonFuc
pro_path
=
commonFuc
().
get_pro_path
()
file_path
=
pro_path
print
(
file_path
)
import
subprocess
# 执行cmd命令
# def execute_command(command):
# # 使用subprocess.run来执行命令
# result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
# # 输出命令的返回结果
# print(result.stdout)
# # 如果有错误,打印错误信息
# if result.stderr:
# print(result.stderr)
# 使用示例
# command = "cd" # 这是一个cmd命令,在Windows上列出当前目录下的文件和文件夹
# execute_command(command)
def
execute_command
(
command
):
os
.
chdir
(
pro_path
)
os
.
system
(
"dir"
)
# 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"
)
report/summary.html
View file @
eeaca1ac
...
@@ -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分3
秒
</td>
<td
class=
'details-col-elapsed'
>
1分10
秒
</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/a
_b9_采购计划_列表查询_条件查询_根据计划类型查询
/log.html'
target=
'_blank'
>
a
_b9_采购计划_列表查询_条件查询_根据计划类型查询
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a
1订单配送列表数据查询_待确认查询3医院
/log.html'
target=
'_blank'
>
a
1订单配送列表数据查询_待确认查询3医院
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
3.6
</td>
<td
class=
"details-col-elapsed"
>
70.779
</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