allure-gradle icon indicating copy to clipboard operation
allure-gradle copied to clipboard

Need to specify systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true' for JUnit 5

Open ootaken opened this issue 7 years ago • 1 comments

I'm submitting a ...

  • [× ] bug report
  • [×] feature request
  • [ ] support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

BDD style annotations like @Feature, @Step are disable on JUnit 5 with standard configuration.

What is the expected behavior?

BDD style annotations like @Feature, @Step are disable on JUnit 5.

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

We need to specify systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true' for JUnit 5 to use BDD style like the following.

test {
        useJUnitPlatform {
            includeEngines 'junit-jupiter'
        }
        systemProperty 'allure.results.directory', 'build/allure-results'
        systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true' // like this
}

We want this to be documented or to include this plugin as a fix.

Please tell us about your environment:

Allure version 2.5
Test framework JUnit [email protected]
Allure adaptor [email protected]
Generate report using [email protected]

ootaken avatar Apr 26 '18 06:04 ootaken

@ootaken , thanks for the isssue. How are you doing?

I did not know why JUnit 5 data was not collected, and thanks to the issue I know it :) Here's a PR that adds the property by default: https://github.com/allure-framework/allure-gradle/pull/61

Please feel free to try it and provide feedback :)

vlsi avatar Apr 27 '21 17:04 vlsi

Resolved in #61

vlsi avatar Sep 14 '22 20:09 vlsi