Andrew Zakordonets
Hi, i’m Andrew , an Software Engineer in Test who loves to learn something new in coding and making machines do the routine work instead of me. I’m located in Amsterdam at the moment.
02 Aug 2017 in allure pytest ~ read.
Opening local version of Allure report with Chrome
Recently I was trying to integrate Allure report with some Webdriver tests I was writing with py.test. I did everything like it was said in the documentation :
- Install allure cli with brew install allure
- Add pytest-allure-adaptor==1.7.7 dependency to requirements.txt
- Add steps annotations to Page Object methods
- Run tests with py.test —alluredir=reports command
- As a result, i got JUnit XML report file that I could use for allure report generation
- I managed to generate the report with allure generate report command. As an outcome, i was able to find allure-reports folder with index.html in it.
But, when I opened it, I got an empty report with 404 Not Found error message.
With allure serve report command I was able to see test results just fine. But for some reason, I couldn’t browse local report in Chrome. So I asked for help. With quick help from Artem Eroshenko we managed to figure out that the problem was in Chrome Same origin policy enabled option. Indeed, when I opened local report in Chrome and went to Developer console, I was able to see the error :
XMLHttpRequest cannot load file:///var/folders/t6/bwm48vv112n2vn943c825t980000gp/T/7567737615297653314/allure-report/data/widgets.json. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
So, how to fix it? Well, you have couple choices :
- Open report in Firefox
- Disable cross origin policy option in Chrome — very bad idea, since your chrome will become vulnerable to third party intrusion. Don’t do it! .
- You can use allure serve allure-report command — it will spin up small web server, that will serve your report and you can view it in your favorite Chrome browser 🙂
Allure team made a really good job with their report tool and I hope with this tip you won’t encounter problems as I did.
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.
Saved searches
Use saved searches to filter your results more quickly
Cancel Create saved search
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
This repository has been archived by the owner on Jan 14, 2019. It is now read-only.
allure-framework / allure1 Public archive
[RU] Вечная загрузка отчета #793
Kappasama opened this issue Apr 27, 2016 · 3 comments
[RU] Вечная загрузка отчета #793
Kappasama opened this issue Apr 27, 2016 · 3 comments
Comments
Kappasama commented Apr 27, 2016 •
При попытке открыть сгенерированный отчет на локальной машине вечно показывается надпись «Loading. «
allure-commandline 1.4.23
pytest-allure-adaptor — 1.7.2
chrome Версия 50.0.2661.87 m
В консоле хрома ошибка:
jquery.min.js:4 XMLHttpRequest cannot load file:///D:/rep/data/plugins.json. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.k.cors.a.crossDomain.send @ jquery.min.js:4
The text was updated successfully, but these errors were encountered:
