allure-framework / allure-framework/allure-java

Ability to rename classes with TestNG

Open
#438 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
376
Forks
241
Avg merge
1d 7h
Merged PRs (30d)
45

Description

#### 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?

Allure groups suites into sub-suites, which, in case of TestNG, are full class names (with their packages).

#### What is the expected behavior?

As far as I understand, Allure has an ability to use custom class names with JUnit. In JUnit, classes can be renamed with `@DisplayName` annotation. In TestNG, there's no such annotation, thus, I'd like to have something like Allure's `@Description` annotation be applicable to class names. For example,
```
@Description("Class Name Without Package")
public class TestClass
```

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

Some projects have very long package names, which are redundant for reports.

#### Please tell us about your environment:
| Allure version | 2.8.1 |
| --- | --- |
| Test framework | testng@6.8 |
| Allure integration | allure-testng@2.13.2 |
| Generate report using | allure-maven@2.10.0 |

#### Other information

Screen Shot 2020-04-14 at 11 37 01

Contributor guide

Open the contributing guide

Research direction

Start by locating the TestNG integration and compare how Allure handles custom class names for JUnit. Define how a class-level description or equivalent should affect the suite name while preserving existing TestNG grouping, then verify the generated report uses the custom name without the package.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.