随笔分类 - Pytest
摘要:背景:测试数据既要在fixture方法中使用,同时也在测试用例中使用 使用方法:在使用parametrize的时候添加"indirect=True"参数。pytest可以实现将参数传到fixture方法中,也可以在当前测试用例中使用。 原理:参数indirect=True时,pytest会把argn
阅读全文
摘要:一文搞懂fixture 各种骚操作: https://blog.csdn.net/weixin_46745811/article/details/122384070 好文好文!
阅读全文
摘要:https://www.cnblogs.com/linuxchao/p/linuxchao-pytest-parametrize.html mark 标记用法:https://www.cnblogs.com/lfr0123/p/15907200.html
阅读全文
摘要:一、requests请求处理cookies鉴权的方法 1、方式一:使用session对象登录成功后会自动携带cookies信息 1 import requests 2 3 #第一步 - 实现session的实例化 4 s = requests.Session() 5 6 #第二部 - 登录,得到co
阅读全文