Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
4768b0fa
Commit
4768b0fa
authored
1 year ago
by
xiao-hesheng
Browse files
Options
Download
Email Patches
Plain Diff
新增角色管理脚本
parent
9b899f48
master
core_flow
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
air_case/b2_herp3_bs/r_e5用户管理_角色管理_编辑角色名称.air/r_e5用户管理_角色管理_编辑角色名称.py
+5
-12
...herp3_bs/r_e5用户管理_角色管理_编辑角色名称.air/r_e5用户管理_角色管理_编辑角色名称.py
report/summary.html
+4
-4
report/summary.html
with
9 additions
and
16 deletions
+9
-16
air_case/b2_herp3_bs/r_e5用户管理_角色管理_编辑角色名称.air/r_e5用户管理_角色管理_编辑角色名称.py
+
5
-
12
View file @
4768b0fa
...
...
@@ -50,7 +50,7 @@ def test1():
print
(
'request_body'
,
request_body
)
# # # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result
ccccccccccccccc
'
,
result
)
print
(
'result
aaaaaaaaaaaaaaaaaaa
'
,
result
)
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
...
...
@@ -58,11 +58,11 @@ def test1():
if
code
==
0
and
len
(
data
)
>=
1
:
for
i
in
data
:
cname
=
commonFuc
().
analysis_json
(
'cname'
,
i
)
if
cname
==
'自动化测试'
:
if
cname
==
'自动化测试'
or
cname
==
'自动化测试2'
:
id1
=
commonFuc
().
analysis_json
(
'id'
,
i
)
break
commonFuc
().
check_text_exist
(
0
,
result
)
print
(
id1
)
print
(
'id1'
,
id1
)
#r_e5用户管理_角色管理_编辑角色名称
...
...
@@ -74,24 +74,17 @@ def test1():
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
'payload63_4'
,
id1
)
# request_body=str(request_body)
new_request_body
=
request_body
.
replace
(
"'"
,
'"'
)
# new_request_body = new_request_body.replace("None", 'null')
# print(new_request_body)
import
json
request_body_json
=
json
.
loads
(
new_request_body
)
print
(
'request_body_json'
,
request_body_json
)
# print('request_body', request_body)
# # # # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
_json
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'resultccccccccccccccc'
,
result
)
# #断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
roleCode
=
""
if
code
==
0
and
len
(
data
)
>
=
1
:
if
code
==
0
and
data
=
=
1
:
commonFuc
().
check_text_exist
(
0
,
result
)
...
...
This diff is collapsed.
Click to expand it.
report/summary.html
+
4
-
4
View file @
4768b0fa
...
...
@@ -55,9 +55,9 @@
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分2秒
</td>
<td
class=
"details-col-elapsed"
>
0.0%
</td>
<td
class=
"details-col-elapsed"
>
10
0.0%
</td>
</tr>
</table>
...
...
@@ -73,8 +73,8 @@
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/r_e5用户管理_角色管理_编辑角色名称/log.html'
target=
'_blank'
>
r_e5用户管理_角色管理_编辑角色名称
</a></td>
<td
class=
"
fail"
>
失败
</td>
<td
class=
"details-col-elapsed"
>
2.
798
</td>
<td
class=
"
success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
2.
839
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets