allure 报告 空白

发布于 2022-09-13 00:33:59 字数 1630 浏览 23 评论 0

image.png

按照各大论坛上命令
pytest --alluredir=<directory-with-results> --clean-alluredir
allure generate <directory-with-results> -o <directory-with-report>


(pytestdemo) F:\work\program\python\pytestdemo>pytest -s -q --alluredir report/result test_demo.py --clean-alluredir
.FF
============================================================================= FAILURES =============================================================================
____________________________________________________________________________ test_add2 _____________________________________________________________________________

    def test_add2():
>       assert add(2,3) ==6
E       assert 5 == 6
E        +  where 5 = add(2, 3)

test_demo.py:8: AssertionError
____________________________________________________________________________ test_add3 _____________________________________________________________________________

    def test_add3():
>       assert add(2, 7) == 6
E       assert 9 == 6
E        +  where 9 = add(2, 7)

test_demo.py:11: AssertionError
===================================================================== short test summary info ======================================================================
FAILED test_demo.py::test_add2 - assert 5 == 6
FAILED test_demo.py::test_add3 - assert 9 == 6
2 failed, 1 passed in 0.16s

(pytestdemo) F:\work\program\python\pytestdemo>allure generate ./report -o ./report/html --clean
Report successfully generated to .\report\html

浏览器打开就这样

请大家帮忙看看问题在哪里?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文