You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@RepeatedTest(value = 2, name = RepeatedTest.LONG_DISPLAY_NAME)
@DisplayName("Long name")
public void repeatLong() {
Assertions.assertTrue(true);
}
@RepeatedTest(value = 2, name = RepeatedTest.SHORT_DISPLAY_NAME)
@DisplayName("Short name")
public void repeatShort() {
Assertions.assertTrue(true);
}
Here how does the Allure report for it looks like:
As you can see, name of the repeatLong test method has duplicated portion in it. I expect the name to be "Long name :: repetition 1 of 2" instead of "Long name Long name :: repetition 1 of 2".
For reference, this is how test names look in IntelliJ IDEA:
and in gradle html report:
Desktop (please complete the following information):
Allure always adds {displayName} for all tests of type test-template-invocation (ParameterizedTest, RepeatedTest etc). That way test names are more readable in Allure for users who uses default configuration.
from UX point of view, default behaviour is much more important. Users who change the defaults are usually have more experience and can tune report to achieve whatever behaviour they want.
My personal opinion on that is that design of short names in JUnit 5 is a mistake. And now everyone is trying to workaround it in reporting, logging etc. Even IDEA removes prefix of name if it starts with name of parent.
Allure will support infinite groupings and report correct execution trees someday, but so far it is as it is. Do you have any suggestions how it supposed to be implemented in the first place?
Activity
baev commentedon Oct 20, 2022
Allure always adds
{displayName}for all tests of typetest-template-invocation(ParameterizedTest, RepeatedTest etc). That way test names are more readable in Allure for users who uses default configuration.iNikem commentedon Oct 20, 2022
But don't you agree that in this case the end result is bad?
baev commentedon Oct 26, 2022
from UX point of view, default behaviour is much more important. Users who change the defaults are usually have more experience and can tune report to achieve whatever behaviour they want.
My personal opinion on that is that design of short names in JUnit 5 is a mistake. And now everyone is trying to workaround it in reporting, logging etc. Even IDEA removes prefix of name if it starts with name of parent.
Allure will support infinite groupings and report correct execution trees someday, but so far it is as it is. Do you have any suggestions how it supposed to be implemented in the first place?