首页 > 代码库 > 在jenkins打开roboframework报告:Opening Robot Framework report failed

在jenkins打开roboframework报告:Opening Robot Framework report failed

Opening Robot Framework report failed


Verify that you have JavaScript enabled in your browser.

Make sure you are using a modern enough browser. Firefox 3.5, IE 8, or equivalent is required, newer browsers are recommended.

Check are there messages in your browser‘s JavaScript error log. Please report the problem if you suspect you have encountered a bug.

解决方案1:

首先在浏览器运行加了此代码的html文件<script>alert(‘我弹‘)</script>,如果能弹说明不是浏览器支持JS的问题

  1. <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title></title>
    </head>
    <body>
    <script>alert(‘我弹‘)</script>
    <p>%s</p>
    </body>
    </html>

    技术分享

  2. 如果不是浏览器的问题,解决如下:

    参考:http://stackoverflow.com/questions/36607394/error-opening-robot-framework-log-failed

    在管理jenkins-->脚本命令行输入如下脚本:

    System.setProperty("hudson.model.DirectoryBrowserSupport.CSP","sandbox allow-scripts; default-src ‘none‘; img-src ‘self‘ data: ; style-src ‘self‘ ‘unsafe-inline‘ data: ; script-src ‘self‘ ‘unsafe-inline‘ ‘unsafe-eval‘ ;")

  3. 运行结果

     技术分享

  4. 再点击要打开的测试报告或输出文件,OK啦

    注:配置完之后最好把jenkins重启下且把浏览器缓存清下

本文出自 “多测师” 博客,请务必保留此出处http://icestick8586.blog.51cto.com/9867871/1884615

在jenkins打开roboframework报告:Opening Robot Framework report failed