Skip to content
Advertisement

Allure report: nothing shown in 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.

Advertisement

Answer

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:

  1. 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

  1. Use –allow-file-access-from-files Chrome flag. See details in this question.
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement