UFT 结果在 Jenkins 报告中不可见

UFT Results are not visible in Jenkins Report

这里有人发布了有关 Jenkins 上的 UFT 报告的问题。他根本没有收到任何回应。我也有同样的问题。也许在这里我们会得到一些帮助。

https://community.saas.hpe.com/t5/Unified-Functional-Testing/UFT-Results-are-not-visible-in-Jenkins-Report/m-p/233091

"I have a VM where UFT 12.52 and Jenkins Server are running. I can access Jenkins from my local computer and start the job, after the test is finished the results are published, but when I click on "run_results.html" 这是一个空网页(run_results.xml 它有结果但不是很用户友好)。如果我继续使用 Jenkins 和UFT 是 运行,然后进入 Jenkins 构建文件夹并打开 run_results.html 我可以看到结果。Jenkins 的结果有什么问题?

注意* 如果我从 Jenkins 下载带有报告的 zip,结果是可见的。

谢谢

通过互联网挖掘后,我发现 Jenkins 有一些关于其工作区上 HTML/JS 文件的安全策略。

设置后System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "") 它解决了问题!

查看详细说明:https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy

*更新: 因为在 jenkins 重启后这些设置被重置,为了永久放松内容安全策略 (CSP),您应该向运行 jenkins.war 的 java 添加一个参数。 在这里,您可以查看有关如何执行此操作的示例和更多说明: https://kb.froglogic.com/display/KB/Content+Security+Policy+%28CSP%29+for+Web+Report