-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display names must not be allowed to be blank #743
Milestone
Comments
Tentatively slated for M4 since this is a bug, but if time constraints are an issue this can be moved to M5. |
sbrannen
added a commit
that referenced
this issue
Mar 20, 2017
This commit introduces a test with an empty, custom display name which should not be permitted. Issue: #743
sbrannen
added a commit
that referenced
this issue
Mar 20, 2017
in progress |
sbrannen
changed the title
@DisplayName must not be allowed to be empty
Display names must not be allowed to be blank
Mar 23, 2017
sbrannen
added a commit
that referenced
this issue
Mar 23, 2017
Prior to this commit, the "not blank" precondition for display names was not consistently enforced. This commit addresses this issue by documenting that custom displays names supplied via @DisplayName, @RepeatedTest, and @ParameterizedTest are never permitted to be blank. Furthermore, the respective handling of each of these annotations has been updated to log a warning if a blank display name (or display name pattern) has been supplied by the user. At this point in time, it is unfortunately not possible to enforce such preconditions with an explicit check using Preconditions.isNotBlank() since we do not have a proper mechanism for handling such configuration exceptions during the TestEngine discovery phase. Issue: #743
Fixed in f03cc6d. |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Status Quo
It is currently possible to declare
@DisplayName("")
(or containing only white space), but this should not be permitted.If a user explicitly declares
@DisplayName
, the user must provide a non-empty name.The same applies to display name patterns supplied via
@RepeatedTest
and@ParameterizedTest
.Related Issues
Deliverables
DisplayName.value
.@DisplayName
.TestInfoParameterResolverTests.customDisplayNameThatIsEmpty()
@Test
,@TestFactory
, and@TestTemplate
methods (for repeated and parameterized tests as well).The text was updated successfully, but these errors were encountered: