【jenkins】解决robotframework插件结果无法打开log文件的方法

安装完jenkins-lts(2.263.4)以后,在win10的slave上执行robotframework的测试任务,执行完成后,在jenkins任务的 "Robot Results"中尝试打开report.html或者log.html的时候,报“Opening Robot Framework report failed”的错误:

 

 根据https://groups.google.com/g/robotframework-users/c/58Gxyxm9gns,解决方法如下:

1. jenkins启动参数加上"-Dhudson.model.DirectoryBrowserSupport.CSP="

 

 2. 我的jenkins-lts是部署在macOS上并且是通过brew启动的,对于这种情况,需要编辑“/usr/local/Cellar/jenkins-lts/2.263.4/homebrew.mxcl.jenkins-lts.plist”文件并做如下修改:

 

 

3. 文件修改完毕后,重启jenkins:

brew services restart jenkins-lts
Stopping `jenkins-lts`... (might take a while)
==> Successfully stopped `jenkins-lts` (label: homebrew.mxcl.jenkins-lts)
==> Successfully started `jenkins-lts` (label: homebrew.mxcl.jenkins-lts)

 

4. 重启完成后,日志可以正常查看了:

 

posted on 2021-04-23 17:11  东西南北风  阅读(322)  评论(0编辑  收藏  举报

导航