systelab / allure-reporter

Printable report generation for Allure
5 stars 2 forks source link

Content of @Feature tag to be displayed only once in Allure-reporter for Java test classes #70

Closed mmrwerfen closed 3 years ago

mmrwerfen commented 3 years ago

Setup:

We have a Java class with JUnit tests, with the @Feature tag set at class level, and one @TmsLink tag for each test method (since each method corresponds to an independent test case within the feature).

Steps:

  1. Run the test class.
  2. Collect the JSON files with allure results and show them in the allure-reporter available in GitHub.

Observed behavior: The Allure Reporter displays each test method as an independent test case, each with the content of its @TmsLink as a header (which is correct), but for each of them, the content of the @Feature tag is replicated. See attached screenshot at the bottom, where each test method/test case is displayed separetely under a green checkbox with the @TmsLink content, but the @Feature is replicated for all of them (marked with a red vertical line in the screenshot).

Desired behavior: Since the @Feature tag is a general description of the feature tested by the class, display it only once at the top, where the summary section for the classs is shown, and not repeated for each test method/test case.

imatge

ManelMoreno commented 3 years ago

I always assumed that the @feature contained the Goal, etc for a specific TC, not for a set of TCs, so it shall be diferent for each one. I'm not totally sure you are placing it on the correct place, but let's clarify with teh rest.. Thanks for the question!

mmrwerfen commented 3 years ago

Manel is right and I was not using the Feature tag appropiately. The issue can be closed.

mmrwerfen commented 3 years ago

Closing issue.