我正在尝试使用Allure框架 https://github.com/allure-framework/allure-core为我生成一份报告硒网络驱动程序 http://docs.seleniumhq.org/projects/webdriver/测试。我用JUnit
框架和allure-maven-插件 https://github.com/allure-framework/allure-core/wiki/Allure-Maven-Plugin使用 Allure 1.3.9 版本。我运行测试mvn test
然后使用生成报告mvn site
。我在中看到生成的报告target/site/allure-maven-plugin/
目录。当我打开时索引.htmlFirefox 下的页面可以正常工作。然而,当在 Chrome 或 Safari 中做同样的事情时我什么也没看见.
怎么了?我错过了什么吗?我的pom.xml
文件位于here https://gist.github.com/just-boris/961cedf9d506ee29173c.
此问题与默认的 Webkit 安全设置有关,该设置禁止在本地文件系统上执行 Ajax 请求。您至少有两种可能的解决方案:
- Serve 索引.html使用一些 Web 服务器,如 Nginx 或 Apache。这将模拟远程网站,从而欺骗您的浏览器。使用 Allure CLI 2.0+ 可以使用以下命令完成此操作:
$ 诱惑报告打开
- Use --允许从文件访问文件铬标志。详情请参阅这个问题 https://stackoverflow.com/questions/16487803/why-does-this-filesystem-api-requestquota-call-fail.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)