"YamlCase/git@172.16.40.31:zhanhuasheng/willdesk_apiauto.git" did not exist on "ccff10c34ec435b461375478f6a3f7067fcde301"
Commit 84731b0f authored by zhanhuasheng's avatar zhanhuasheng

新增睡眠关键字

parent 57cb8228
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('用例格式有误')
......
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