GeezerVison is showing github.com — Ability to rename classes with TestNG · Issue #438 · allure-framework/allure-java
Ability to rename classes with TestNG #438DescriptionI'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:
Other information

Activitykathyrollo commented on Apr 21, 2020 I would think the JUnit 5 adapter is more up to date. JUnit 5 is a good turning point to move away from TestNG now. sokecze commented on Apr 21, 2020
I would think the JUnit 5 adapter is more up to date. JUnit 5 is a good turning point to move away from TestNG now.
@kathyrollo unfortunately, JUnit 5 suites are not as flexible as in TestNG. The way suites organized in TestNG are more convenient, I think. I'd prefer to stay with TestNG with an ability to rename test classes kathyrollo commented on Apr 24, 2020 Used TestNG for the past 3 years, I opted with simply tagging my tests correctly and passing the tags via cmdline to the maven-surefire-plugin (see "Filtering by Tags"), also more flexible for CI/CD . Removing the testng.xml was 1 less file to maintain since my switch to JUnit 5 and was rather refreshing and lightweight. They also have versatile annotations for naming tests which Allure already supports natively (see here).
Nonetheless, I understand if you would still prefer to proceed with TestNG, just thought I would share the modern flexibility of JUnit 5. It may be more apt to request this feature with TestNG instead.
Good luck! kathyrollo commented on Apr 25, 2020 sokecze commented on May 1, 2020 @kathyrollo this doesn't work and throws
[main] ERROR io.qameta.allure.AllureLifecycle - Could not update test fixture: test fixture with uuid 3c4f2e98-e994-477e-b58f-26215de9e0ab not found
[main] ERROR io.qameta.allure.AllureLifecycle - Could not stop test fixture: test fixture with uuid 3c4f2e98-e994-477e-b58f-26215de9e0ab not found
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|