Skip to content

Annotation Description with "useJavaDoc=true" using JUnit4 does not show in Allure Reports #982

@focbenz

Description

@focbenz

Describe the bug
The Allure Report does not show the description if Maven JUnit4 is used with the Annotation @Description(useJavaDoc = true)

To Reproduce
Use the Git Repo: https://github.com/focbenz/allure-junit-example/tree/bug/javadoc-description-not-in-report or the following
Steps to reproduce the behavior:

  1. Add @Description(useJavaDoc = true) to an existing JUnit4 test case. e.g.
/**
  * This Javadoc describes the test that just passes. Demonstrates the use of Javadoc as test description.
  */
@Test
@Description(useJavaDoc = true)
public void simpleTestWithDescriptionFromJavadoc() throws Exception {
	assertThat(1, is(1));
}
  1. Run 'mvn clean test allure:report allure:serve' to see the report
  2. Check the description of test method simpleTestWithDescriptionFromJavadoc

Expected behavior
See the Javadoc as description in the report for the SimpleTest method simpleTestWithDescriptionFromJavadoc.

Screenshots
Allure_JUnit4_NoDescriptionFromJavadoc

Environment (please complete the following information):

There is a sample project available as fork from the allure-junit-sample project:
https://github.com/focbenz/allure-junit-example/tree/bug/javadoc-description-not-in-report

Allure version 2.13.3
Test framework JUnit@4.12
Allure adaptor allure-junit4@2.13.3
Generate report using allure-maven@2.10

Additional context

  • The resource files are correctly generated in target\test-classes\allureDescriptions by the AnnotationProcessor
  • but the content is not written in the descriptionHtml nodes of the result files

But:

  • Just using the annotation @description("Documentation") works.
  • Running the same configuration as described with the JUnit5 framework generates the report correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions