随笔分类 - httprunner
摘要:场景:想要提取token,在前置用例中获取token并写入config.ini 配置文件中,但在hrun3的用例里无法获取最新写入的值(框架问题) 解决:把获取方法写在debugtalk.py中放到httprunner用例中运行,即可
阅读全文
摘要:httprunner3的log本身是不能在allure上展示的 可以通过改写\Lib\site-packages\httprunner\runner.py文件中的test_start方法实现报告存放allure中展示 添加一行 allure.attach.file(self.__log_path,
阅读全文
摘要:httprunner框架继承了requests库的优良特征,会自动管理cookie 如果B接口的请求头需要添加A接口返回的cookie,不用手动添加,调用A接口后,B接口的请求头中会自动添加 https://www.cnblogs.com/yoyoketang/p/12343714.html
阅读全文
摘要:参考:https://www.jianshu.com/p/b0bad20ec015 例如把请求头中cookie内容删除 def headers_delete_cookie(request: dict): request["headers"]["Set-Cookie"] = "" request["h
阅读全文
摘要:https://blog.csdn.net/qq_27371025/article/details/119793969 因为headers.Content-Type有特殊字符-,jmespath处理特殊字符可以用引号包起来headers.\"Content-Type\"
阅读全文
摘要:httprunner2 和 httprunner3对比 https://www.cnblogs.com/yoyoketang/p/15009395.html httprunner3中文文档 https://ontheway.cool/HttpRunner3DocsForCN/concepts/ste
阅读全文
摘要:YAML配置文件的格式要求? a.yaml是数据格式,不是数据类型 b.yaml配置文件的后缀为.yaml或者.yml c.yaml配置文件中使用#进行注释,不可以在yaml数据行内进行注释 d.yaml为key: value,key往往与冒号之间不加空格,value与冒号之间必须得加空格 e.ya
阅读全文
摘要:一、安装 pip install httprunner==2.3.0 二、创建 cmd中 hrun --startproject + 项目名 eg:hrun --startproject httprunner_learn 三、HttpRunnser 2.x工程目录结构 1.api目录 a.主要存放接
阅读全文

浙公网安备 33010602011771号