[ https://issues.apache.org/jira/browse/SUREFIRE-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17651361#comment-17651361 ]
Andreas Pabst commented on SUREFIRE-2101: ----------------------------------------- The PR #549 does not fix the issue completely. I have opened an alternative PR #587 that fixes it completely. > 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.10#820010)