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
34f00d94
Commit
34f00d94
authored
Sep 15, 2023
by
xiao-hesheng
Browse files
优化脚本
parent
cd4f8e08
Changes
5
Hide whitespace changes
Inline
Side-by-side
air_case/mdm3_pim/分页查询供应商产品数据.air/分页查询供应商产品数据.py
→
air_case/mdm3_pim/
a
分页查询供应商产品数据.air/
a
分页查询供应商产品数据.py
View file @
34f00d94
...
...
@@ -56,4 +56,4 @@ data = commonFuc().analysis_json('data', data)
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict"
)
# print('预期值',check_dict)
commonFuc
().
check_text_exist
(
code
,
result
)
# 检查验证码
commonFuc
().
check_text_exist
(
data
,
result
)
# 检查数据data为空[]
\ No newline at end of file
commonFuc
().
check_text_exist
(
'[]'
,
result
)
# 检查数据data为空[]
air_case/mdm3_pim/产品信息审核_查询.air/产品信息审核_查询.py
0 → 100644
View file @
34f00d94
air_case/mdm3_pim/产品信息申报.air/产品信息申报.py
0 → 100644
View file @
34f00d94
# -*- encoding=utf8 -*-
from
common.timeUtils
import
timeUtils
from
common.fileUtls
import
FileUtils
import
sys
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web,产品信息申报,id2251,id2251-2,sit,on,2023091201
主数据平台:产品信息申报
"""
module
=
"mdm3_pim"
from
common.common_func
import
commonFuc
,
using
from
air_case.mdm_login.登录外网系统.登录外网系统
import
login_system
pro_path
=
commonFuc
().
get_pro_path
()
sys
.
path
.
append
(
pro_path
+
r
'\\air_case\\mdm3_pim\\a分页查询供应商产品数据.air'
)
using
(
pro_path
+
r
'\\air_case\\mdm3_pim\\a分页查询供应商产品数据.air'
)
from
a分页查询供应商产品数据
import
*
"""
场景:产品信息申报
用例名称:产品信息申报
输入:CRid
输出:"rtn_msg": "ok"
"""
# 登录
username
=
global_var_cname
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
print
(
username
,
password
)
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# 产品信息申报接口
module
=
"mdm3_pim"
# 产品申报
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"submitGoodsRegist_url"
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
projectCode
)
p_name
=
commonFuc
().
get_business_data
(
module
,
"name1"
)
# 获取前缀name
p_name
=
p_name
+
commonFuc
().
randomString
(
5
)
# 随机数生成拼接产品名称
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload6"
,
p_name
,
p_name
,
p_name
,
p_name
,
p_name
,
p_name
,
p_name
,
p_name
,
p_name
,
p_name
,
p_name
,
p_name
,
p_name
,
p_name
)
print
(
'新增产品请求体'
,
request_body
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
"新增产品返回结果"
,
result
)
goodsRegistVO
=
commonFuc
().
analysis_json
(
'goodsRegistVO'
,
result
)
goodsName
=
commonFuc
().
analysis_json
(
'goodsName'
,
goodsRegistVO
)
commonFuc
().
check_text_exist
(
goodsName
,
result
)
# 检查返回结果中是否存在新增的产品名称
\ No newline at end of file
air_case/mdm3_psm/a产品规格申报.air/a产品规格申报.py
View file @
34f00d94
...
...
@@ -9,7 +9,7 @@ from common.fileUtls import *
__author__
=
"xiaohesheng"
"""
case_tag:api,mdm-web产品规格新增,id2253,id2253-1,sit,on
case_tag:api,mdm-web
,
产品规格新增,id2253,id2253-1,sit,on
主数据平台:web产品规格新增
"""
...
...
report/summary.html
View file @
34f00d94
...
...
@@ -54,8 +54,8 @@
</tr>
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
4
</td>
<td
class=
'details-col-elapsed'
>
4
</td>
<td
class=
'details-col-elapsed'
>
0分2秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
...
...
@@ -72,9 +72,30 @@
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
分页查询供应商产品数据
/log.html'
target=
'_blank'
>
分页查询供应商产品数据
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
a产品规格申报
/log.html'
target=
'_blank'
>
a产品规格申报
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
2.673
</td>
<td
class=
"details-col-elapsed"
>
0.829
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a查询产品规格数据/log.html'
target=
'_blank'
>
a查询产品规格数据
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
0.415
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a认领锁定产品规格/log.html'
target=
'_blank'
>
a认领锁定产品规格
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
0.835
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/b产品规格审核通过/log.html'
target=
'_blank'
>
b产品规格审核通过
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
0.398
</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