Skip to content

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

Closed

Description

@znevrly

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

Activity

  1. 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[/+] on Jan 26, 2018
  2. added a commit that references this issue on Nov 1, 2018
    37853fd
  3. added theissue type on Jul 10, 2026
  4. removed
    pr:bugSomething isn't working
    on Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions