如何在 Pycharm 中使用 pytest-html?

Har*_*jeb 3 pytest pytest-html

我已经安装了 pytest-html 并想在 pycharm 中运行 pytest 后使用它生成 html 报告。

像这样: 配置

但它弹出错误:

ERROR: file not found: html=report\result.html
Run Code Online (Sandbox Code Playgroud)

运行后。那么如何修改参数呢?

小智 6

使用

--html=Reports/Report.html  --self-contained-html
Run Code Online (Sandbox Code Playgroud)

在 pycharm 的附加参数部分