[
https://issues.apache.org/jira/browse/SUREFIRE-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17556071#comment-17556071
]
Ashley Scopes commented on SUREFIRE-2101:
-----------------------------------------
I have opened a PR at https://github.com/apache/maven-surefire/pull/549 to
address this issue.
> Phrased test names with missing @DisplayName result in a "null" test name
> -------------------------------------------------------------------------
>
> Key: SUREFIRE-2101
> URL: https://issues.apache.org/jira/browse/SUREFIRE-2101
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin
> Affects Versions: 3.0.0-M7
> Environment: All platforms
> Reporter: Ashley Scopes
> Priority: Minor
> Attachments: example-reproduction.png
>
>
> If I enable phrased test naming in config, and then write a test such as the
> following:
> {code:java}
> // Note no @DisplayName("...")
> class SomeTest {
> void fooHasThreeCharacters() {
> assertThat(foo).hasSize(3)
> }
> }
> {code}
> ...then the console reports will contain a null name rather than something
> meaningful.
> I am proposing that when this phrased name is unavailable, Surefire should
> fall back to the original test name that would have been provided if phrased
> naming was disabled. The reasoning behind this is that showing an unformatted
> class name is more useful to the developer reading Maven logs than just the
> phrase {{null}}.
> !example-reproduction.png!
--
This message was sent by Atlassian Jira
(v8.20.7#820007)