Pytest allure:AttributeError: module 'pytest' has no attribute 'allure'


allure-report      case test_demo1.py
louie-mac:allureDemo louiezhou$ pytest -s --alluredir=report
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/_pytest/main.py", line 187, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/_pytest/config/__init__.py", line 720, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pluggy/hooks.py", line 308, in call_historic
INTERNALERROR>     res = self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pluggy/manager.py", line 92, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pluggy/manager.py", line 86, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/allure/pytest_plugin.py", line 80, in pytest_configure
INTERNALERROR>     pytest.allure._allurelistener = testlistener
INTERNALERROR> AttributeError: module 'pytest' has no attribute 'allure'

查了很多网站, 没有solution,最终还是找到了

pip uninstall pytest-allure-adaptor
pip install allure-pytest

尚书·大禹谟---人心惟危,道心惟微,惟精惟一,允执厥中, 天之历数在尔躬,允执其中. 

今日精选推荐

JMeter接口测试-if控制器

JMeter数据库操作

Jmeter接口测试-正则表达式

JMeter中文返回乱码

Jmeter接口测试-参数化

JMeter接口测试-基础

测试-感想

 

 

入群交流请加微信号

扫描二维码

 

欢迎关注微信公众号了解更多精彩内容

请猛戳下面二维码了解更多

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值