allure-framework / allure-maven

Maven plugin generating Allure report from test results
Apache License 2.0
94 stars 54 forks source link

Add a mvn command to generate single file report #295

Closed MahmoudElSharkawy closed 1 month ago

MahmoudElSharkawy commented 10 months ago

It would be a big addition to the plugin if we are able to generate the single file report from the allure-maven plugin directly as It was already introduced here https://github.com/allure-framework/allure2/pull/2072

The request is to add a new command to generate single file report, can be something like this: mvn allure:single-report

LucaLis commented 1 month ago

Hello.

Is there any chance of getting this done?

Reports from larger projects are getting really big and it's really hard to move them around, extract archive with huge amounts of files etc. Having it all in a single (but still large) file would be really handy in some cases.

Another reason to do that is the fact that security policy in browsers does not allow to load resources from local files therefore users standard multi-file report need to add a special flag to eg chrome to open the report (--allow-file-access-from-files). Loading a single file is not a problem in such case...

baev commented 1 month ago

Released as 2.14.0. To active single file mode, you need to use a new configuration property singleFile:

<plugin>
    <groupId>io.qameta.allure</groupId>
    <artifactId>allure-maven</artifactId>
    <version>2.14.0</version>
    <configuration>
        <singleFile>true</singleFile>
    </configuration>
</plugin>
LucaLis commented 1 month ago

Thanks a lot @baev !!

amardeep2006 commented 1 month ago

Thanks for this awesome feature @baev .