allure-framework / allure2

Allure Report is a flexible, lightweight multi-language test reporting tool. It provides clear graphical reports and allows everyone involved in the development process to extract the maximum of information from the everyday testing process
https://allurereport.org/
Apache License 2.0
4.19k stars 712 forks source link

Export Allure Report to a single HTML File #755

Closed jakerolandaban closed 1 year ago

jakerolandaban commented 6 years ago

[//]: # ( . Note: for support questions, please use Stackoverflow or Gitter. . This repository's issues are reserved for feature requests and bug reports. . . In case of any problems with Allure Jenkins plugin please use the following repository . to create an issue: https://github.com/jenkinsci/allure-plugin/issues . . Make sure you have a clear name for your issue. The name should start with a capital . letter and no dot is required in the end of the sentence. An example of good issue names: . . - The report is broken in IE11 . - Add an ability to disable default plugins . - Support emoji in test descriptions )

I'm submitting a ...

What is the current behavior?

Allure Report is only available as long as i have the json files to generate it and keep the terminal open.

What is the motivation / use case for changing the behavior?

Need a single HTML file to keep track of for historical information of the report, and can be send as 1 file to the whole team. (e.g February2018_Report.html)

I tried saving the report as Webpage, Complete but the webpage was empty, have loading icons, and 404 not found.

Please tell us about your environment:

I'm using allure 2.5.0 and allure-behave using allure serve {folder} in the terminal to generate the report

And that's all i believe what i am doing

antshc commented 6 years ago

It's a good idea and we can send this report in email to customers.

twixdouble commented 6 years ago

it's really a must-have feature - please do it as soon as possible

omitiev commented 6 years ago

Agree. I would like to have a saved version of previous reports for using when it's needed.

jakerolandaban commented 6 years ago

I actually found a workaround for this, you can use allure generate command to save the website files into a specific folder (files include .json files and index.html).

Once you do that you can store all of it on an aws s3 bucket and enable web hosting. This way you can just send the Link of the report allure has generated.

marcel9414 commented 6 years ago

Hello! This request has been implemented? I need the same, an html with all the steps to send it to the client.

Thanks!

SymphonicJohn commented 6 years ago

@jakerolandaban I was able to serve a single report by placing it in an s3 bucket as you described. Thanks for that. Can you link to or elaborate on how this would work with multiple test runs? When I go to the buckets suggested domain: bucket-name.s3-website-us-west-2.amazonaws.com the path /# is added by default and the 'trend' section is blank. Thanks

jakerolandaban commented 6 years ago

@SymphonicJohn you're running multiple test runs but only 1 is being shown? did I get that correct? for the trends, try to look up categories.json on allure framework docs

Sup3rGeo commented 6 years ago

You can use the command allure generate <alluredir> to create html files. This folder you could send around, but you can only directly open the index.html file with Edge or Firefox.

For Chrome, you need the --allow-file-access-from-files flag when running chrome, according to this: https://stackoverflow.com/questions/18586921/how-to-launch-html-using-chrome-at-allow-file-access-from-files-mode. Also it gives you other options, like running python -m http.server in the results folder so you don't have to use that option.

amarusic commented 6 years ago

Is any news about generation Allure Report as single HTML File without dependency to json and csv files?

Thanks!

goodbomb commented 6 years ago

+1

rapidroamer commented 5 years ago

+1

slavvka commented 5 years ago

+1

aikrasnov commented 5 years ago

+1

chunji08 commented 5 years ago

+1 If there is some update, can someone share ?
I would like this report carries: 1) the current execution statics, suc/failure/skilp rate, in such fancy allure style. 2) maybe the past 10, 100 execution history, in a diagram chart. 3) Provide a link, where if the user wants more details, they can click the link to go to the actual jenkins web page.

Thanks a lot ! -cji

rafaelcs commented 5 years ago

I actually found a workaround for this, you can use allure generate command to save the website files into a specific folder (files include .json files and index.html).

Once you do that you can store all of it on an aws s3 bucket and enable web hosting. This way you can just send the Link of the report allure has generated.

@jakerolandaban I want to do just that, the problem is that after generating the results (allure generate) and trying to open only the HTML file, the result is not shown, only if I run the allure open command, but my idea is to generate the report and view it in my bucket. More tips?

kool79 commented 5 years ago

@rafaelcs did you read comment by @Sup3rGeo above?

For Chrome, you need the --allow-file-access-from-files flag

dreambe commented 5 years ago

Is any news about generation Allure Report as single HTML File without dependency to json and csv files?

Thanks!

+1

soduor commented 5 years ago

I actually found a workaround for this, you can use allure generate command to save the website files into a specific folder (files include .json files and index.html). Once you do that you can store all of it on an aws s3 bucket and enable web hosting. This way you can just send the Link of the report allure has generated.

@jakerolandaban I want to do just that, the problem is that after generating the results (allure generate) and trying to open only the HTML file, the result is not shown, only if I run the allure open command, but my idea is to generate the report and view it in my bucket. More tips?

I actually found a workaround for this, you can use allure generate command to save the website files into a specific folder (files include .json files and index.html).

Once you do that you can store all of it on an aws s3 bucket and enable web hosting. This way you can just send the Link of the report allure has generated.

Hi. Could you please elaborate on how you achieved this? I've stored my files in an s3 bucket but I'm getting a 404 error when visit the s3 endpoint. Any help will be greatly appreciated

aaa-jake commented 5 years ago

I actually found a workaround for this, you can use allure generate command to save the website files into a specific folder (files include .json files and index.html). Once you do that you can store all of it on an aws s3 bucket and enable web hosting. This way you can just send the Link of the report allure has generated.

@jakerolandaban I want to do just that, the problem is that after generating the results (allure generate) and trying to open only the HTML file, the result is not shown, only if I run the allure open command, but my idea is to generate the report and view it in my bucket. More tips?

I actually found a workaround for this, you can use allure generate command to save the website files into a specific folder (files include .json files and index.html). Once you do that you can store all of it on an aws s3 bucket and enable web hosting. This way you can just send the Link of the report allure has generated.

Hi. Could you please elaborate on how you achieved this? I've stored my files in an s3 bucket but I'm getting a 404 error when visit the s3 endpoint. Any help will be greatly appreciated

Have you enabled the web-hosting feature of your s3 bucket?

ntindle commented 5 years ago

Love this idea and it would be fantastic

rafaelcs commented 5 years ago

Here is my solution to upload the report to AWS S3

# Generate Allure report
allure generate -c reports/allure-results -o reports/allure-results-html

# Upload HTML report to AWS S3
aws s3 sync reports/allure-results-html s3://your_bucket/
fescobar commented 5 years ago

I've added to Allure Docker container the emailable report feature. You can export it to a simple Html. https://github.com/fescobar/allure-docker-service#customize-emailable-report

eleni-salamani commented 4 years ago

+1

DikshaBaluja commented 4 years ago

@Sup3rGeo Is it also possible if allure server is not up and running ? Thanks

poovaraj commented 4 years ago

ReportWebPlugin

How to generate static report using ReportWebPlugin ?

abhi8130 commented 4 years ago

How could we access the allure reports .html file in Github? Locally we can achieve it by using allure serve allure-results / allure generate but in Github how we can achieve it

umeshwalagedara commented 4 years ago

This allure generate thing does not work for me... The data are not appearing in the report.... Pages are there but values are not coming... is there any thing extra we have to do.

jmatthews79 commented 4 years ago

@umeshwalagedara Can you tell us what steps you have tried so far? How did you install allure?

fescobar commented 4 years ago

This allure generate thing does not work for me... The data are not appearing in the report.... Pages are there but values are not coming... is there any thing extra we have to do.

@umeshwalagedara you have here multiple examples: https://github.com/fescobar/allure-docker-service#generate-allure-results Skip the docker part.

karthick4kumaran commented 4 years ago

Guys, I posted a workaround with just a few lines of shell script for mac and batch script for windows. Please find my answer in the following link, https://stackoverflow.com/questions/41960081/how-to-send-an-email-of-allure-report/64011632#64011632

We just need to share the entire allure-report folder over the email and the user who downloads it can open the allure report with the shell script/batch script. They don't need to have allure installed in their system as well. Check it out. It's free and it doesn't involve any third party or costly amazon was bucket.

lalithach commented 3 years ago

Just like /graph that displays the trend seperately, is there are any way to view the status of the tests passed and failed ??? so that, that snapshot can be shared in the email.

rakeshnambiar commented 3 years ago

Hello all, Is there any way to generate the summary report for each test execition on the allure sever something like https://qameta.io/ ?

MihanEntalpo commented 2 years ago

I've made a tool for my own usage that is able to compile output folder of allure generate into a single html file that is working fine. It's alpha version, where are not pip module yet, but it's already working: https://github.com/MihanEntalpo/allure-single-html-file

Khouloud-moalla commented 2 years ago

it in my bucket can you explain more !

MihanEntalpo commented 2 years ago

@Khouloud-moalla

it in my bucket can you explain more !

If your question is about single-file allure builder, you can view readme at https://github.com/MihanEntalpo/allure-single-html-file#readme

Khouloud-moalla commented 2 years ago

@Khouloud-moalla

it in my bucket can you explain more !

If your question is about single-file allure builder, you can view readme at https://github.com/MihanEntalpo/allure-single-html-file#readme

if I combine them how I can know which file for which browser!!

MihanEntalpo commented 2 years ago

@Khouloud-moalla

it in my bucket can you explain more !

If your question is about single-file allure builder, you can view readme at https://github.com/MihanEntalpo/allure-single-html-file#readme

if I combine them how I can know which file for which browser!!

It's easy. Just use firefox or any chrome-based browser on generated file "complete.html" :)

jabhijeet commented 2 years ago

@Khouloud-moalla

it in my bucket can you explain more !

If your question is about single-file allure builder, you can view readme at https://github.com/MihanEntalpo/allure-single-html-file#readme

@MihanEntalpo Can you please release/publish a version for allure-combine?

Thanks

MihanEntalpo commented 2 years ago

Can you please release/publish a version for allure-combine?

@jabhijeet already done. Working version 1.0.6 in PIP

Also, discussion about allure-combine is offtopic here, so, you are welcome in Issues page of allure-combine project if you have any troubles

OrenBerreby commented 2 years ago

@MihanEntalpo

Hey I seem to have an issue running this, I have python 3.9 installed but whenever i run the allure combine command I get "Could not parse arguments: Expected a command, got combine" Do you know how I might resolve this? Really want to get this working, I am definitely in the right directory of the allure results tried also the report.

Thank you

MihanEntalpo commented 2 years ago

@OrenBerreby would you kindly create an issue in the repository of allure-combine?

erineia commented 2 years ago

Pessoal, alguém pode me ajudar com uma questão. Tenho umas classes que ao clicar abre uma guia com o PDF, é uma guia referente a uns testes que precisa gerar o PDF, porém não sei como apresentar eles no relatório allure noTest body, será que alguém conseguem me ajudar com isso, qual anotação, que jeito eu faria isso?

image

fescobar commented 2 years ago

Pessoal, alguém pode me ajudar com uma questão. Tenho umas classes que ao clicar abre uma guia com o PDF, é uma guia referente a uns testes que precisa gerar o PDF, porém não sei como apresentar eles no relatório allure noTest body, será que alguém conseguem me ajudar com isso, qual anotação, que jeito eu faria isso?

image

@erineia Write in eglish man

erineia commented 2 years ago

Greetings colleagues, can someone please help me? I have some classes that open a tab with a PDF file, but I don't know how to present these PDFs in the allure report inside Test body, can anyone help me with this, what annotations, which way would I do this? image

ReachHeaven commented 1 year ago

+1

rnagarajaiah commented 4 months ago

@Khouloud-moalla , I tried generating the html file, it generates with dependencies. The html report is not loading the data, I tried in different browser, same issue is being observed.