javaallure

Allure report html is not loading json data


I run tests using Java and collect the results with Allure. As a result folder allure-results generated with banch of json files. I can see the report if I use allure serve allure-results. However, I want to generate html that I can view any time later. So I do it by allure generate allure-results --clean -o allure-report. As a result folder with index.html file is generated. However, when I open this file the data is not loaded. Please see the attachment below.Allure report In console I get CORS policy errors. The example is below.

Acess to XMLHttpRequest at 'build/allure-results/widgets/summary.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.

Is there a problem in the way I generate the report or is there a way to see the html properly?


Solution

  • The index.html file opens properly when opened from an IDE.