学习 python+pytest+selenium+allure 自动化时,遇到问题AttributeError: 'CollectReport' object has no attribute 'description'
项目来源:https://www.cnblogs.com/wxhou/p/12207914.html#conftestpy
操作
重构了代码结构,将配置文件yaml、ini全改成了 toml
出现问题
解决
总结
出现这个问题
第一可能性:没有设置钩子函数
第二可能性:书写错误,如 description写成了descripion
我是因为配置文件的参数名写错了,因为一直走不到读取测试用例数,所以怀疑是search_action.py这个用来操作搜索的文件有问题,果然一开始的就是初始化错了