Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allure annotation (e.g.Feature, Story) does not work with JUnit 5 dynamic tests #189

Closed
1 of 3 tasks
znevrly opened this issue Jan 26, 2018 · 0 comments · Fixed by #261
Closed
1 of 3 tasks

Allure annotation (e.g.Feature, Story) does not work with JUnit 5 dynamic tests #189

znevrly opened this issue Jan 26, 2018 · 0 comments · Fixed by #261
Labels
theme:junit-platform JUnit 5 related issue type:bug Something isn't working work:review Work is done, waiting for review

Comments

@znevrly
Copy link

znevrly commented Jan 26, 2018

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?

JUnit 5 dynamic tests are not supported at all. Don't add annotation information to results.

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

Have simple code in allure-junit5-example project

@feature("Some feature")
@Severity(SeverityLevel.CRITICAL)
public class SimpleTest {

@TestFactory
Collection<DynamicTest> dynamicTestsWithCollection() {
    return Arrays.asList(
            DynamicTest.dynamicTest("Add test",
                    () -> assertEquals(2, Math.addExact(1, 1))),
            DynamicTest.dynamicTest("Multiply Test",
                    () -> assertEquals(4, Math.multiplyExact(2, 2))));
}

}

Annotation feature and story should be added in each generated dynamic test in allure results. The same should happen if TestFactory method is annotated by any meaningful annotation such Description, DisplayName, Feature, Story etc.

What is the expected behavior?

JUnit 5 dynamic tests should support all annotations.

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

Please tell us about your environment:

Allure version 2.2.0
Test framework testng@6.8
Allure integration allure-testng@2.0-BETA11
Generate report using allure-maven@2.18

Other information

@znevrly znevrly changed the title Allure annotation (Feature, Story) does not support JUnit 5 dynamic tests Allure annotation (e.g.Feature, Story) does not work with JUnit 5 dynamic tests Jan 26, 2018
@baev baev added type:bug Something isn't working work:review Work is done, waiting for review theme:junit-platform JUnit 5 related issue labels Nov 1, 2018
@baev baev closed this as completed in #261 Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme:junit-platform JUnit 5 related issue type:bug Something isn't working work:review Work is done, waiting for review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants