Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
willdesk_apiauto
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
29
Issues
29
List
Boards
Labels
Service Desk
Milestones
Merge Requests
29
Merge Requests
29
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
桦生 詹
willdesk_apiauto
Commits
84731b0f
"YamlCase/git@172.16.40.31:zhanhuasheng/willdesk_apiauto.git" did not exist on "ccff10c34ec435b461375478f6a3f7067fcde301"
Commit
84731b0f
authored
Mar 08, 2024
by
zhanhuasheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增睡眠关键字
parent
57cb8228
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Utils/req_handler.py
Utils/req_handler.py
+5
-2
No files found.
Utils/req_handler.py
View file @
84731b0f
import
asyncio
import
json
import
time
import
jsonpath
import
requests
import
re
...
...
@@ -60,6 +59,8 @@ class ReqHandler:
encoding
=
'utf8'
)
as
f
:
content
=
f
.
read
()
exec
(
content
)
if
case
.
get
(
'sleep'
):
time
.
sleep
(
float
(
case
[
'sleep'
]))
return
1
url
=
case
[
'url'
]
if
'http'
in
case
[
'url'
]
else
config_handler
.
base_config
.
get_value
(
'url'
,
'test_address'
)
+
case
[
'url'
]
#判断是否有域名,没有的话给config文件中的默认测试域名
method
=
case
[
'method'
]
...
...
@@ -92,6 +93,8 @@ class ReqHandler:
encoding
=
'utf8'
)
as
f
:
content
=
f
.
read
()
exec
(
content
)
if
case
.
get
(
'sleep'
):
time
.
sleep
(
float
(
case
[
'sleep'
]))
else
:
raise
TypeError
(
'用例格式有误'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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