allure-framework / allure-gradle

Allure Gradle Plugin
Apache License 2.0
88 stars 36 forks source link

No reports are generated when using latest Allure version (2.16.1) #82

Open serzhshakur opened 3 years ago

serzhshakur commented 3 years ago

I'm submitting a ...

What is the current behavior?

No reports are generated when using latest Allure version (2.16.1)

allure_gradle_bug

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

This can be easily observed using this project Do

git checkout allure-2.16.1
./gradlew clean runTestsOne
./gradlew allureAggregateServe  

Click the link provided by allureAggregateServe in the output - no report is served. The report is successfully generated when using Allure version 2.14.0 and below (check the same project on master branch).

What is the expected behavior?

Report should be properly generated and viewed while served.

Please tell us about your environment:

Allure version 2.16.1
Test framework junit 5
Allure adaptor junit5@2.9.6
Generate report using allure-gradle@2.9.6
baev commented 2 years ago

ok, the issue is that you setting allure commandline version (using version.set(allureVersion)), but not updating allure-java version (allureJavaVersion.set(allureVersion)).

So the following will work:

allure {
    version.set(allureVersion)
    adapter {
        allureJavaVersion.set(allureVersion)
        frameworks {
            junit5
        }
    }
}

since we are using the same version for allure-java and allure report itself it probably makes sense to fix it and make so users only set a single property by default.

vlsi commented 2 years ago

@baev , is allureJava adapter always released together with allure-commandline? If that is the case, we could use allureJavaVersion.convention(allure.version) so allureJavaVersion is using allure.version by default.

WDYT?

At the same time, we should probably bump the defaults for allure.version, apsectjVersion, etc.

vlsi commented 2 years ago

I believe the issue is fixed in https://github.com/allure-framework/allure-gradle/pull/99