allure-gradle
allure-gradle copied to clipboard
Need to specify systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true' for JUnit 5
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 , 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 :)
Resolved in #61