随笔分类 -  httprunner3源码解读

摘要:源码目录结构 get_uniform_comparator 作用:将比较器别名转换为统一名称 if comparator in ["eq", "equals", "equal"]: return "equal" elif comparator in ["lt", "less_than"]: retu 阅读全文
posted @ 2021-11-15 17:14 Silent丿丶黑羽 阅读(127) 评论(0) 推荐(0)
摘要:源码结构目录 可以看到此模块定义了4个属性和12个函数,我们依次来讲解 属性源码分析 # 匹配http://或https:// absolute_http_url_regexp = re.compile(r"^https?://", re.I) # 使用$$转义$符号 dolloar_regex_c 阅读全文
posted @ 2021-11-08 15:34 Silent丿丶黑羽 阅读(196) 评论(0) 推荐(0)
摘要:源码目录结构 ApiResponse 这个类没啥好说的 class ApiResponse(Response): """ 继承了requests模块中的Response类,重写了里面的raise_for_status方法 """ def raise_for_status(self): if hasa 阅读全文
posted @ 2021-11-05 15:25 Silent丿丶黑羽 阅读(272) 评论(0) 推荐(0)
摘要:源码目录结构 我们首先来看下models.py的代码结构 我们可以看到这个模块中定义了12个属性和22个模型类,我们依次来看 属性源码分析 import os from enum import Enum from typing import Any from typing import Dict, 阅读全文
posted @ 2021-11-05 13:44 Silent丿丶黑羽 阅读(238) 评论(0) 推荐(0)
摘要:前言 最近想着搭建一个API测试平台,基础的注册登录功能已经完成,就差测试框架的选型,最后还是选择了httprunner,github上已经有很多开源的httprunner测试平台,但是看了下都是基于httprunner1.5.8测试框架,1.0和3.0差距还是很大的,所以自己想集成个3.0的平台, 阅读全文
posted @ 2021-11-04 21:59 Silent丿丶黑羽 阅读(363) 评论(0) 推荐(0)