Commit 86f349c5 authored by zhanhuasheng's avatar zhanhuasheng

1、数据库修改地址

2、告警时间调整
parent fad1116c
......@@ -27,13 +27,13 @@ formal_password = 123456789A
address = 47.251.1.100
#端口
port = 3306
port = 13306
#账号
account = willdesk
account = root
#密码
password = uitSElgrwLp6vFG
password = YKp-gmG28isz5qX
[rerun]
rerun = 1
......
......@@ -2,6 +2,8 @@ import time
import jsonpath
import pymysql.err
import warnings
import pytest
import requests
import re
import os
......@@ -141,9 +143,9 @@ class ReqHandler:
try:
assert res.status_code == 200 #先断言状态码是正确的
time = res.elapsed.total_seconds()
if time >= 4:
warnings.warn(f'接口响应时间过长,耗时{time}秒')
logger.error(f'接口响应时间过长,耗时{time}秒')
if time >= 5:
warnings.warn(f'接口响应时间过长,耗时{str(time)}秒',RuntimeWarning) #告警接口耗时过长
logger.error(f'接口响应时间过长,耗时{str(time)}秒')
if isinstance(expected,list):
'''
穿进来的expected一定是 {"eq":{$.code : value}} 的形式,要断言的值一定是通过jsonpath去检索的
......
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