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-cmdc
Commits
882008e6
Commit
882008e6
authored
Jun 21, 2024
by
周念东
Browse files
用例优化
parent
f9a12b3c
Changes
7
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_login/后台管理系统登录/verifycode.png
View replaced file @
f9a12b3c
View file @
882008e6
1.98 KB
|
W:
|
H:
1.66 KB
|
W:
|
H:
2-up
Swipe
Onion skin
air_case/cmdc_product_dirtvalue_config/属性值配置.air/属性值配置.py
View file @
882008e6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"zhouniandong"
__author__
=
"zhouniandong"
"""
"""
case_tag:cmdc_api,cmdc属性值配置,2
293,229
3-7,sit,bs
case_tag:cmdc_api,cmdc属性值配置,2
003-7,200
3-7
-2
,sit,bs
主数据平台:运营后台管理系统属性值配置接口
主数据平台:运营后台管理系统属性值配置接口
"""
"""
...
...
air_case/cmdc_product_dirtvalue_config/属性值配置编辑属性值.air/属性值配置编辑属性值.py
0 → 100644
View file @
882008e6
# -*- encoding=utf8 -*-
__author__
=
"zhouniandong"
"""
case_tag:cmdc_api,cmdc属性值配置编辑属性值,2003-7,2003-7-3,sit,bs
主数据平台:运营后台管理系统属性值配置接口
"""
from
common.common_func
import
commonFuc
from
air_case.cmdc_login.后台管理系统登录.后台管理系统登录
import
CmdcDoLogin
import
requests
import
json
module
=
"cmdc_product_dirtvalue_config"
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url3"
)
print
(
url
)
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcDoLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
cmdc_access_token
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload3"
)
"""
场景:属性值配置()
用例名称:属性值配置编辑属性值(属性值配置)
输出:{"success":true,"code":"200","message":"OK"}
"""
# 发送请求
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
result
=
json
.
loads
(
result
.
content
)
# print(result)
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict3"
)
print
(
check_dict
)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
\ No newline at end of file
air_case/cmdc_product_dirtvalue_config/属性值配置选择属性列表.air/属性值配置选择属性列表.py
View file @
882008e6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
__author__
=
"zhouniandong"
__author__
=
"zhouniandong"
"""
"""
case_tag:cmdc_api,cmdc属性值配置属性列表,2
293,229
3-7,sit,bs
case_tag:cmdc_api,cmdc属性值配置属性列表,2
003-7,200
3-7
-1
,sit,bs
主数据平台:运营后台管理系统属性值配置接口
主数据平台:运营后台管理系统属性值配置接口
"""
"""
...
...
data/cmdc_product_dirtvalue_config/data
View file @
882008e6
...
@@ -19,4 +19,11 @@ checkDict1: {"success":true,"code":"200","message":"OK"}
...
@@ -19,4 +19,11 @@ checkDict1: {"success":true,"code":"200","message":"OK"}
"payload2": {"dirtCode":null,"dirtValueName":null,"dirtValueCode":null,"pageStart":1,"pageSize":10,"pageTotal":0}
"payload2": {"dirtCode":null,"dirtValueName":null,"dirtValueCode":null,"pageStart":1,"pageSize":10,"pageTotal":0}
#预期结果
#预期结果
checkDict2: {"success":true,"code":"200","message":"OK"}
checkDict2: {"success":true,"code":"200","message":"OK"}
\ No newline at end of file
#属性值配置编辑属性值 post
"url3": "/product/updateDirtValue"
"payload3": {"dirtId":768,"dirtValueCode":"LC","dirtValueName":"圣洛西亚"}
#预期结果
checkDict3: {"success":true,"code":"200","message":"OK"}
log/runtime.txt
View file @
882008e6
a_商品标签管理取消标记 1718935700722 1718935702137
zhouniandong
属性值配置新增属性值 1718939182659 1718939183946
zhouniandong
report/summary.html
View file @
882008e6
...
@@ -73,9 +73,9 @@
...
@@ -73,9 +73,9 @@
</tr>
</tr>
<tr
width=
"600"
>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
a_商品标签管理取消标记
/log.html'
target=
'_blank'
>
a_商品标签管理取消标记
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/
属性值配置新增属性值
/log.html'
target=
'_blank'
>
属性值配置新增属性值
</a></td>
<td
class=
"fail"
>
失败
</td>
<td
class=
"fail"
>
失败
</td>
<td
class=
"details-col-elapsed"
>
1.
415
</td>
<td
class=
"details-col-elapsed"
>
1.
287
</td>
<td
class=
"details-col-elapsed"
>
zhouniandong
</td>
<td
class=
"details-col-elapsed"
>
zhouniandong
</td>
<td
class=
"details-col-elapsed"
>
0
</td>
<td
class=
"details-col-elapsed"
>
0
</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