Open sokecze opened 4 years ago
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.
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
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!
I was going over the Allure docs, it seems Allure already supports this for TestNG. You have to use the description
property of the @Test
annotation.
@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
I'm submitting a ...
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,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