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
e33e0f35
Commit
e33e0f35
authored
Dec 12, 2023
by
xiao-hesheng
Browse files
修改脚本适合融合环境
parent
a0fcb4a1
Changes
6
Hide whitespace changes
Inline
Side-by-side
air_case/a5_mdm3_pdm/a3产品信息审核_查询.air/a3产品信息审核_查询.py
View file @
e33e0f35
...
@@ -51,15 +51,14 @@ def select1():
...
@@ -51,15 +51,14 @@ def select1():
print
(
"产品信息审核查询返回结果"
,
result
)
print
(
"产品信息审核查询返回结果"
,
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
total
>=
1
:
if
total
>=
1
:
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
id1
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
0
])
data1
=
data
[
0
]
auditOrgId
=
commonFuc
().
analysis_json
(
'hosId'
,
data1
[
0
])
id1
=
commonFuc
().
analysis_json
(
'id'
,
data1
)
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsid'
,
data1
[
0
])
auditOrgId
=
commonFuc
().
analysis_json
(
'hosId'
,
data1
)
provGoodsid
=
commonFuc
().
analysis_json
(
'provGoodsid'
,
data1
[
0
])
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsid'
,
data1
)
goodsAuditBillId
=
commonFuc
().
analysis_json
(
'billId'
,
data1
[
0
])
provGoodsid
=
commonFuc
().
analysis_json
(
'provGoodsid'
,
data1
)
targetId
=
commonFuc
().
analysis_json
(
'id'
,
data1
[
0
])
goodsAuditBillId
=
commonFuc
().
analysis_json
(
'billId'
,
data1
)
targetId
=
commonFuc
().
analysis_json
(
'id'
,
data1
)
print
(
id1
,
auditOrgId
,
hosGoodsId
,
provGoodsid
,
goodsAuditBillId
,
targetId
)
print
(
id1
,
auditOrgId
,
hosGoodsId
,
provGoodsid
,
goodsAuditBillId
,
targetId
)
info
=
(
id1
,
auditOrgId
,
hosGoodsId
,
provGoodsid
,
goodsAuditBillId
,
targetId
)
info
=
(
id1
,
auditOrgId
,
hosGoodsId
,
provGoodsid
,
goodsAuditBillId
,
targetId
)
titlename
=
(
"MSPid"
,
'hosId'
,
'hosGoodsId'
,
'provGoodsid'
,
'goodsAuditBillId'
,
'targetId'
)
titlename
=
(
"MSPid"
,
'hosId'
,
'hosGoodsId'
,
'provGoodsid'
,
'goodsAuditBillId'
,
'targetId'
)
...
...
air_case/a5_mdm3_pdm/a4产品信息审核通过.air/a4产品信息审核通过.py
View file @
e33e0f35
...
@@ -45,8 +45,6 @@ def test1():
...
@@ -45,8 +45,6 @@ def test1():
projectCode
)
projectCode
)
info
=
FileUtils
().
r_info6
(
module
,
"产品审核信息"
,
'message2'
)
info
=
FileUtils
().
r_info6
(
module
,
"产品审核信息"
,
'message2'
)
print
(
info
)
print
(
info
)
# total= info['total']
MSPid
=
info
[
'MSPid'
]
MSPid
=
info
[
'MSPid'
]
hosId
=
info
[
'hosId'
]
hosId
=
info
[
'hosId'
]
hosGoodsId
=
info
[
'hosGoodsId'
]
hosGoodsId
=
info
[
'hosGoodsId'
]
...
...
air_case/a5_mdm3_pdm/a4产品信息审核驳回.air/a4产品信息审核驳回.py
View file @
e33e0f35
...
@@ -29,7 +29,7 @@ def test1():
...
@@ -29,7 +29,7 @@ def test1():
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\a5_mdm3_pdm\\a3产品信息审核_查询.air'
)
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\a5_mdm3_pdm\\a3产品信息审核_查询.air'
)
using
(
pro_path
+
r
'\\air_case\\a5_mdm3_pdm\\a3产品信息审核_查询.air'
)
using
(
pro_path
+
r
'\\air_case\\a5_mdm3_pdm\\a3产品信息审核_查询.air'
)
from
a3产品信息审核_查询
import
select1
from
a3产品信息审核_查询
import
select1
select1
()
#
select1()
"""
"""
场景:a3产品信息审核驳回
场景:a3产品信息审核驳回
用例名称:a3产品信息审核驳回
用例名称:a3产品信息审核驳回
...
...
air_case/a5_mdm3_pdm/a5产品信息审核查询_无数据.air/a5产品信息审核查询_无数据.py
View file @
e33e0f35
...
@@ -51,13 +51,14 @@ def select1():
...
@@ -51,13 +51,14 @@ def select1():
print
(
"产品信息审核查询返回结果"
,
result
)
print
(
"产品信息审核查询返回结果"
,
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
total
>=
1
:
if
total
>=
1
:
id1
=
commonFuc
().
analysis_json
(
'id'
,
data
)
id1
=
commonFuc
().
analysis_json
(
'id'
,
data
1
[
0
]
)
auditOrgId
=
commonFuc
().
analysis_json
(
'hosId'
,
data
)
auditOrgId
=
commonFuc
().
analysis_json
(
'hosId'
,
data
1
[
0
]
)
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsid'
,
data
)
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsid'
,
data
1
[
0
]
)
provGoodsid
=
commonFuc
().
analysis_json
(
'provGoodsid'
,
data
)
provGoodsid
=
commonFuc
().
analysis_json
(
'provGoodsid'
,
data
1
[
0
]
)
goodsAuditBillId
=
commonFuc
().
analysis_json
(
'billId'
,
data
)
goodsAuditBillId
=
commonFuc
().
analysis_json
(
'billId'
,
data
1
[
0
]
)
targetId
=
commonFuc
().
analysis_json
(
'id'
,
data
)
targetId
=
commonFuc
().
analysis_json
(
'id'
,
data
1
[
0
]
)
print
(
id1
,
auditOrgId
,
hosGoodsId
,
provGoodsid
,
goodsAuditBillId
,
targetId
)
print
(
id1
,
auditOrgId
,
hosGoodsId
,
provGoodsid
,
goodsAuditBillId
,
targetId
)
info
=
(
id1
,
auditOrgId
,
hosGoodsId
,
provGoodsid
,
goodsAuditBillId
,
targetId
)
info
=
(
id1
,
auditOrgId
,
hosGoodsId
,
provGoodsid
,
goodsAuditBillId
,
targetId
)
titlename
=
(
"MSPid"
,
'hosId'
,
'hosGoodsId'
,
'provGoodsid'
,
'goodsAuditBillId'
,
'targetId'
)
titlename
=
(
"MSPid"
,
'hosId'
,
'hosGoodsId'
,
'provGoodsid'
,
'goodsAuditBillId'
,
'targetId'
)
...
...
common/fileUtls.py
View file @
e33e0f35
...
@@ -35,6 +35,20 @@ class FileUtils(object):
...
@@ -35,6 +35,20 @@ class FileUtils(object):
return
None
return
None
else
:
else
:
return
None
return
None
def
r_info2
(
self
,
module
,
keyname
):
w_path
=
rootPath
+
os
.
sep
+
'data'
+
os
.
sep
+
module
yamlpath
=
os
.
path
.
join
(
w_path
,
"message2"
)
file_value
=
open
(
yamlpath
,
'r'
,
encoding
=
'utf-8'
)
result
=
yaml
.
load
(
file_value
.
read
(),
Loader
=
yaml
.
Loader
)
if
result
is
not
None
:
key
=
keyname
if
key
in
result
:
return
result
[
key
]
else
:
return
None
else
:
return
None
#供货关系信息写入文件
#供货关系信息写入文件
def
w_info1
(
self
,
info
,
module
,
keyname
):
def
w_info1
(
self
,
info
,
module
,
keyname
):
module
=
module
module
=
module
...
@@ -187,7 +201,7 @@ class FileUtils(object):
...
@@ -187,7 +201,7 @@ class FileUtils(object):
w_path
=
rootPath
+
os
.
sep
+
'data'
+
os
.
sep
+
module
w_path
=
rootPath
+
os
.
sep
+
'data'
+
os
.
sep
+
module
# print(w_path)
# print(w_path)
yamlpath
=
os
.
path
.
join
(
w_path
,
message_no
)
yamlpath
=
os
.
path
.
join
(
w_path
,
message_no
)
if
(
self
.
r_info
(
module
,
keyname
)
!=
None
):
if
(
self
.
r_info
2
(
module
,
keyname
)
!=
None
):
print
(
'已有相同信息,覆盖写入'
)
print
(
'已有相同信息,覆盖写入'
)
# 写入到yaml文件
# 写入到yaml文件
with
open
(
yamlpath
,
"w"
,
encoding
=
"utf-8"
)
as
f
:
with
open
(
yamlpath
,
"w"
,
encoding
=
"utf-8"
)
as
f
:
...
...
report/summary.html
View file @
e33e0f35
...
@@ -54,10 +54,10 @@
...
@@ -54,10 +54,10 @@
</tr>
</tr>
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
4
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
9
</td>
<td
class=
'details-col-elapsed'
>
0分
5
秒
</td>
<td
class=
'details-col-elapsed'
>
0分
23
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0
%
</td>
<td
class=
"details-col-elapsed"
>
64.29
%
</td>
</tr>
</tr>
</table>
</table>
...
@@ -71,10 +71,101 @@
...
@@ -71,10 +71,101 @@
<th
class=
'details-col-msg'
>
用例作者
</th>
<th
class=
'details-col-msg'
>
用例作者
</th>
</tr>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a1_1产品新增导入_高值/log.html'
target=
'_blank'
>
a1_1产品新增导入_高值
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
5.543
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a1_2产品新增导入_试剂/log.html'
target=
'_blank'
>
a1_2产品新增导入_试剂
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
2.473
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a1产品新增导入/log.html'
target=
'_blank'
>
a1产品新增导入
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
2.125
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a2产品导入查询/log.html'
target=
'_blank'
>
a2产品导入查询
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
1.697
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a3产品信息审核_查询/log.html'
target=
'_blank'
>
a3产品信息审核_查询
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a3产品信息审核_查询/log.html'
target=
'_blank'
>
a3产品信息审核_查询
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
5.436
</td>
<td
class=
"details-col-elapsed"
>
2.398
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a4产品信息审核通过/log.html'
target=
'_blank'
>
a4产品信息审核通过
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
2.431
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a4产品信息审核驳回/log.html'
target=
'_blank'
>
a4产品信息审核驳回
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
4.52
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a5产品信息审核查询_无数据/log.html'
target=
'_blank'
>
a5产品信息审核查询_无数据
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
2.15
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a6产品信息审核_获取产品详情信息/log.html'
target=
'_blank'
>
a6产品信息审核_获取产品详情信息
</a></td>
<td
class=
"fail"
>
失败
</td>
<td
class=
"details-col-elapsed"
>
0.005
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a7产品信息审核_通过/log.html'
target=
'_blank'
>
a7产品信息审核_通过
</a></td>
<td
class=
"fail"
>
失败
</td>
<td
class=
"details-col-elapsed"
>
0.006
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a8产品新增和审核通过/log.html'
target=
'_blank'
>
a8产品新增和审核通过
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
0.002
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a8产品新增和审核驳回/log.html'
target=
'_blank'
>
a8产品新增和审核驳回
</a></td>
<td
class=
"fail"
>
失败
</td>
<td
class=
"details-col-elapsed"
>
0.004
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a99产品信息审核_锁定/log.html'
target=
'_blank'
>
a99产品信息审核_锁定
</a></td>
<td
class=
"fail"
>
失败
</td>
<td
class=
"details-col-elapsed"
>
0.003
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a99产品信息审核_锁定后查询/log.html'
target=
'_blank'
>
a99产品信息审核_锁定后查询
</a></td>
<td
class=
"fail"
>
失败
</td>
<td
class=
"details-col-elapsed"
>
0.003
</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