Commit d83d8b04 authored by zhanhuasheng's avatar zhanhuasheng

bugfix

parent a35caedb
......@@ -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
......
......@@ -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] == '\\':
......
......@@ -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}"}
......@@ -131,3 +131,4 @@ def call_fixture():
loop.run_until_complete(close_ws()) #关闭服务
loop.stop()
loop.close()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment