0

--- 问题解决了。见评论 ---
pytest-html 很棒。在本地查看报告时,我可以单击复选框 [通过][失败][跳过]。我也可以点击每一列的排序按钮 pytest html 报告本地



我使用 Jenkins“发布 html 报告”来查看有关 Jenkins 的报告。列排序按钮不见了,复选框不见了。提前致谢。

Jenkins 中的 pytest html 报告

pytest -vs ${test_suite} --url $url --junitxml ${test_suite_xml} --html=${test_suite_html}
pytest-html 1.19.0
Jenkins 2.121.2
html 发布者插件 1.16

4

1 回答 1

0

找到了原因。Java 脚本被禁用。按照此链接设置内容安全策略

System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")

让我感到困惑的是,运行该命令后似乎没有任何反应。原因如下:

How to interpret the output:

No output below "Result" header: default protection
Output Result: below "Result" header: protection disabled
Output Result: some text here below "Result" header: custom protection
于 2018-10-03T00:10:40.917 回答