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
d83d8b04
Commit
d83d8b04
authored
Apr 10, 2024
by
zhanhuasheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
a35caedb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
Utils/req_handler.py
Utils/req_handler.py
+3
-1
Utils/yaml_handler.py
Utils/yaml_handler.py
+0
-3
YamlCase/FAQ/article.yaml
YamlCase/FAQ/article.yaml
+2
-1
conftest.py
conftest.py
+1
-0
No files found.
Utils/req_handler.py
View file @
d83d8b04
...
...
@@ -102,9 +102,11 @@ class ReqHandler:
else
:
raise
TypeError
(
'用例格式有误'
)
except
AssertionError
:
logger
.
error
(
f
'
{
title
}
用例执行失败,失败原因:断言不通过
\n
期望值
{
expected
}
\n
实际返回值
{
res
.
text
}
'
)
logger
.
error
(
f
'
{
title
}
用例执行失败,失败原因:断言不通过
\n
用例
{
case
}
\n
期望值
{
expected
}
\n
实际返回值
{
res
.
text
}
'
)
raise
AssertionError
except
Exception
as
e
:
import
traceback
print
(
traceback
.
print_exc
())
logger
.
error
(
f
'
{
title
}
用例执行失败,失败原因:
{
e
}
'
)
raise
Exception
...
...
Utils/yaml_handler.py
View file @
d83d8b04
...
...
@@ -3,9 +3,6 @@ import os
from
Utils
import
path_handler
class
yamlHandler
:
def
get_case
(
self
,
file_path
):
try
:
while
file_path
[
0
]
==
'/'
or
file_path
[
0
]
==
'
\\
'
:
...
...
YamlCase/FAQ/article.yaml
View file @
d83d8b04
...
...
@@ -146,4 +146,5 @@ api16:
-
eq
:
{
"
$.code"
:
0
}
-
eq
:
{
"
$.data.articleList[?(@.id
==
'${article_id}')].articleEvaluateBad"
:
"
${article_evaluate_bad_add}"
}
-
eq
:
{
"
$.data.articleList[?(@.id
==
'${article_id}')].articleEvaluateGood"
:
"
${article_evaluate_good_add}"
}
-
eq
:
{
"
$.data.articleList[?(@.id
==
'${article_id}')].views"
:
"
${article_view_count_add}"
}
\ No newline at end of file
-
eq
:
{
"
$.data.articleList[?(@.id
==
'${article_id}')].views"
:
"
${article_view_count_add}"
}
conftest.py
View file @
d83d8b04
...
...
@@ -131,3 +131,4 @@ def call_fixture():
loop
.
run_until_complete
(
close_ws
())
#关闭服务
loop
.
stop
()
loop
.
close
()
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