1 Star 1 Fork 0

Jelly/TeemoHrun

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
debugtalk.py 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
Jelly 提交于 2021-07-31 18:53 . 12
import time, hashlib
from common_func.login import *
# httprunner缺点
"""
1.没有idea自动提示错误功能
2.suite无法多次运行,没有一个参数驱动
3.缺少重试机制(异步接口,你不知道返回,)
retry: (5, 10) 5代表次数, 10代表多少时间 10s
content.code == 200
4.变量支持定义太多了,容易出问题,不好定位,缺少:变量追踪,变量的链路功能
5.debugtalk.py 不支持根据业务名,多个py文件读取
支持读取ini变量 loing_name
6.hrun3.x 版本,剔除了api层,只有case和suite2层,框架不走yml和json,写py代码,链式编程
"""
def sleep(n_secs):
time.sleep(n_secs)
def setup_login_hooks():
print("setup_login_hooks_cases....")
def teardown_login_hooks():
print("teardown_login_hooks_cases")
def setup_login_hooks_step(request):
setup_login_hooks_step(request)
def teardown_login_hooks_step(response):
teardown_login_hooks_step(response)
def md5(str):
a = hashlib.md5()
a.update(str)
return a.hexdigest()
# print(md5("123456".encode("utf-8")))
def skipif_test():
print("test_skipif。。。。。。。")
return False
def retern_task_name(task_name):
import time
return f"{time.time()}_{task_name}"
# print(retern_task_name("test_jelly"))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/Jelly-cool/teemo-hrun.git
git@gitee.com:Jelly-cool/teemo-hrun.git
Jelly-cool
teemo-hrun
TeemoHrun
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385