Allure report: nothing shown in Chrome(引诱报告:Chrome 中没有显示任何内容)
问题描述
我正在尝试使用 Allure-framework 为我的<一个 href="http://docs.seleniumhq.org/projects/webdriver/" rel="noreferrer">Selenium WebDriver 测试.我使用 JUnit 框架和 allure-maven-plugin 与 Allure 1.3.9 版本.我使用 mvn test 运行测试,然后使用 mvn site 生成报告.我在 target/site/allure-maven-plugin/ 目录中看到生成的报告.当我使用 Firefox 打开 index.html 页面时,它可以正常工作.但是,在 Chrome 或 Safari 中执行相同操作时 我什么也看不到.
怎么了?我错过了什么吗?我的 pom.xml 文件位于这里.
此问题与默认 Webkit 安全设置有关,该设置禁止在本地文件系统上执行 Ajax 请求.您至少有两种可能的解决方案:
- 使用 Nginx 或 Apache 等网络服务器提供 index.html.这将模拟远程网站,从而欺骗您的浏览器.使用 Allure CLI 2.0+ 可以使用以下命令完成:
<块引用>
$ 诱惑报告打开
- 使用 --allow-file-access-from-files Chrome 标志.请参阅此问题中的详细信息.
I'm trying to use Allure-framework to generate a report for my Selenium WebDriver tests. I use JUnit framework and allure-maven-plugin with version 1.3.9 of Allure. I run tests with mvn test then generate the report using mvn site. I see generated report in target/site/allure-maven-plugin/ directory. When I open index.html page with Firefox it works normally. However when doing the same thing in Chrome or Safari I see nothing.
What's wrong? Am I missing something? My pom.xml file is located here.
This problem is related to default Webkit security settings which forbid doing Ajax requests on the local filesystem. You have at least two possible solutions:
- Serve index.html with some web-server like Nginx or Apache. This will emulate remote website and thus trick your browser. With Allure CLI 2.0+ this can be done using the following command:
$ allure report open
- Use --allow-file-access-from-files Chrome flag. See details in this question.
这篇关于引诱报告:Chrome 中没有显示任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:引诱报告:Chrome 中没有显示任何内容
基础教程推荐
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
