Cas*_*ass 3 python android adb pytest
我正在使用Appium和py.test在Android上进行UI测试自动化.我希望能够在测试失败后使用adb保存错误报告.
有没有办法判断我的测试代码中的测试是否失败,以便我可以在拆解时运行保存错误报告?
最初,我只是在每次测试后保存错误报告,但每次测试增加45秒会有点过分.
Bru*_*ira 5
您可以在pytest_runtest_logreport此处实现一个钩子conftest.py:
pytest_runtest_logreport
conftest.py
def pytest_runtest_logreport(report): if report.when == 'call' and report.failed: # save bug report
有关更多信息,请参阅使用插件和conftest文件进行Woking.
归档时间:
11 年 前
查看次数:
821 次
最近记录: