Skip to content

Allure ignore '@DisplayName' annotation for test class for junit 5 #180

Closed

Description

@rosolko

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?

Display text from '@DisplayName' annotation only for test methods.
And ignore for test class.

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

@DisplayName("Sample test class")
class SampleTests {
    @Test
    @DisplayName("Sample test #2")
    void test2() {
    }

    @Test
    @DisplayName("Sample test #1")
    void test1() {
    }
}

What is the expected behavior?

Display text from '@DisplayName' annotation for test class in report.
Sample test class

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

Display package name instead of text from '@DisplayName' annotation

Please tell us about your environment:

Allure version 2.5.0
Test framework junit@5.0.2
Allure integration allure-junit5@2.0-BETA21
Generate report using allure-gradle@2.5

Other information

screen shot 2018-01-03 at 11 58 42

Activity

  1. symonk commented on Jan 3, 2018

    @symonk

    DisplayName
    @DisplayName annotation has been removed.

    @rosolko can you try using => @Description("Sample Test #1")

    Just guessing at a quick glance, I will look into it if that is not the case soon

  2. rosolko commented on Jan 4, 2018

    @rosolko
    Author

    @symonk @DisplayName - it's annotation from junit 5, not from allure

  3. symonk commented on Jan 4, 2018

    @symonk

    my apologies @rosolko I completely misread

  4. velios commented on Jul 6, 2018

    @velios

    Please do smth with this behavior. Or maybe allure already had some description functionality to classes? I tried but it didn't work

  5. added a commit that references this issue on Nov 1, 2018
    37853fd
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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions